generated from unkin/rpmbuild-template
Compare commits
2 Commits
104345fa17
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d30b27408a | |||
| 668f28e658 |
-35
@@ -1,35 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: almalinux8
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: git.query.consul/unkin/almalinux8:latest
|
|
||||||
commands:
|
|
||||||
# Install the required packages using custom repositories
|
|
||||||
- dnf install -y rpm cmake git make python3-yaml
|
|
||||||
|
|
||||||
# Run the `make` command
|
|
||||||
- make package
|
|
||||||
|
|
||||||
- name: upload
|
|
||||||
image: git.query.consul/unkin/almalinux8:latest
|
|
||||||
environment:
|
|
||||||
GITEA_PASSWORD:
|
|
||||||
from_secret: gitea_password
|
|
||||||
commands:
|
|
||||||
- >
|
|
||||||
for rpm in /drone/src/packages/*.rpm; do
|
|
||||||
curl --user droneci:$GITEA_PASSWORD --upload-file $rpm https://git.query.consul/api/packages/unkin/rpm/almalinux/el8/upload
|
|
||||||
done
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
@@ -20,10 +20,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
run: |
|
run: |
|
||||||
|
dnf groupinstall -y 'Development Tools'
|
||||||
dnf install -y rpm cmake git make python3-yaml
|
dnf install -y rpm cmake git make python3-yaml
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: make build
|
run: make package
|
||||||
|
|
||||||
- name: Find built packages
|
- name: Find built packages
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -22,15 +22,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
run: |
|
run: |
|
||||||
|
dnf groupinstall -y 'Development Tools'
|
||||||
dnf install -y rpm cmake git make python3-yaml
|
dnf install -y rpm cmake git make python3-yaml
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: make build
|
run: make package
|
||||||
|
|
||||||
- name: Upload RPMs
|
- name: Upload RPMs
|
||||||
env:
|
env:
|
||||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
for rpm in /workspace/src/rpmbuild/RPMS/*/*.rpm; do
|
for rpm in /workspace/unkin/rpmbuild-proxlb/packages/*.rpm; do
|
||||||
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.query.consul/api/packages/unkin/rpm/almalinux/el8/upload
|
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.query.consul/api/packages/unkin/rpm/almalinux/el8/upload
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
VERSION=1.0.2
|
VERSION=1.0.2
|
||||||
REPO_URL=https://github.com/gyptazy/ProxLB.git
|
REPO_URL=https://github.com/gyptazy/ProxLB.git
|
||||||
BUILD_DIR=/workspace/build
|
BUILD_DIR=$(PWD)/build
|
||||||
PACKAGE_DIR=workspace/packages
|
PACKAGE_DIR=$(PWD)/packages
|
||||||
REPO_DIR=/workspace/ProxLB
|
REPO_DIR=$(PWD)/ProxLB
|
||||||
|
|
||||||
.PHONY: all clean download prepare build package
|
.PHONY: all clean download prepare build package
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ all: download prepare build package
|
|||||||
download:
|
download:
|
||||||
@if [ ! -d "$(REPO_DIR)" ]; then \
|
@if [ ! -d "$(REPO_DIR)" ]; then \
|
||||||
echo "Cloning repository..."; \
|
echo "Cloning repository..."; \
|
||||||
git clone $(REPO_URL); \
|
git clone $(REPO_URL) $(REPO_DIR); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare directories
|
# Prepare directories
|
||||||
@@ -26,7 +26,7 @@ prepare: download
|
|||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
build: prepare
|
build: prepare
|
||||||
cd $(BUILD_DIR) && cmake ../$(REPO_DIR)/packaging
|
cd $(BUILD_DIR) && cmake $(REPO_DIR)/packaging
|
||||||
|
|
||||||
# Package the project
|
# Package the project
|
||||||
package: build
|
package: build
|
||||||
|
|||||||
Reference in New Issue
Block a user