generated from unkin/rpmbuild-template
Compare commits
2 Commits
35dd4d6130
..
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
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on AlmaLinux 8
|
||||
runs-on: almalinux-8
|
||||
container:
|
||||
image: git.query.consul/unkin/almalinux8:latest
|
||||
steps:
|
||||
- name: Install nodejs:20
|
||||
run: |
|
||||
dnf module enable -y nodejs:20
|
||||
dnf install -y nodejs
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
dnf groupinstall -y 'Development Tools'
|
||||
dnf install -y rpm cmake git make python3-yaml
|
||||
|
||||
- name: Build project
|
||||
run: make package
|
||||
|
||||
- name: Find built packages
|
||||
run: |
|
||||
find /workspace | grep -E \.rpm$
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on AlmaLinux 8
|
||||
runs-on: almalinux-8
|
||||
container:
|
||||
image: git.query.consul/unkin/almalinux8:latest
|
||||
steps:
|
||||
- name: Install nodejs:20
|
||||
run: |
|
||||
dnf module enable -y nodejs:20
|
||||
dnf install -y nodejs
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
dnf groupinstall -y 'Development Tools'
|
||||
dnf install -y rpm cmake git make python3-yaml
|
||||
|
||||
- name: Build project
|
||||
run: make package
|
||||
|
||||
- name: Upload RPMs
|
||||
env:
|
||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||
run: |
|
||||
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
|
||||
done
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
VERSION=1.0.2
|
||||
REPO_URL=https://github.com/gyptazy/ProxLB.git
|
||||
BUILD_DIR=build
|
||||
PACKAGE_DIR=packages
|
||||
REPO_DIR=ProxLB
|
||||
BUILD_DIR=$(PWD)/build
|
||||
PACKAGE_DIR=$(PWD)/packages
|
||||
REPO_DIR=$(PWD)/ProxLB
|
||||
|
||||
.PHONY: all clean download prepare build package
|
||||
|
||||
@@ -15,7 +15,7 @@ all: download prepare build package
|
||||
download:
|
||||
@if [ ! -d "$(REPO_DIR)" ]; then \
|
||||
echo "Cloning repository..."; \
|
||||
git clone $(REPO_URL); \
|
||||
git clone $(REPO_URL) $(REPO_DIR); \
|
||||
fi
|
||||
|
||||
# Prepare directories
|
||||
@@ -26,7 +26,7 @@ prepare: download
|
||||
|
||||
# Build the project
|
||||
build: prepare
|
||||
cd $(BUILD_DIR) && cmake ../$(REPO_DIR)/packaging
|
||||
cd $(BUILD_DIR) && cmake $(REPO_DIR)/packaging
|
||||
|
||||
# Package the project
|
||||
package: build
|
||||
|
||||
Reference in New Issue
Block a user