Compare commits

..

2 Commits

Author SHA1 Message Date
unkinben d30b27408a Merge pull request 'feat: first build of ProxLB' (#1) from neoloc/firstbuild into master
Deploy / Build on AlmaLinux 8 (push) Successful in 1m57s
Reviewed-on: https://git.query.consul/unkin/rpmbuild-proxlb/pulls/1
2024-09-07 23:37:48 +10:00
unkinben 668f28e658 feat: first build of ProxLB
Build / Build on AlmaLinux 8 (pull_request) Successful in 1m49s
- version 1.0.2
- setup gitea actions workflows
2024-09-07 23:33:56 +10:00
4 changed files with 73 additions and 40 deletions
-35
View File
@@ -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
+31
View File
@@ -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$
+37
View File
@@ -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
+5 -5
View File
@@ -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