generated from unkin/rpmbuild-template
feat: first build of ProxLB
Some checks failed
Build / Build on AlmaLinux 8 (pull_request) Failing after 1m48s
Some checks failed
Build / Build on AlmaLinux 8 (pull_request) Failing after 1m48s
- version 1.0.2 - setup gitea actions workflows
This commit is contained in:
parent
5b47fd7869
commit
38da6718f8
31
.gitea/workflows/build.yaml
Normal file
31
.gitea/workflows/build.yaml
Normal 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 build
|
||||
|
||||
- name: Find built packages
|
||||
run: |
|
||||
find /workspace | grep -E \.rpm$
|
||||
37
.gitea/workflows/deploy.yaml
Normal file
37
.gitea/workflows/deploy.yaml
Normal 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 build
|
||||
|
||||
- name: Upload RPMs
|
||||
env:
|
||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||
run: |
|
||||
for rpm in /workspace/src/rpmbuild/RPMS/*/*.rpm; do
|
||||
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.query.consul/api/packages/unkin/rpm/almalinux/el8/upload
|
||||
done
|
||||
39
Makefile
Normal file
39
Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# Makefile for building and packaging ProxLB as an RPM
|
||||
|
||||
VERSION=1.0.2
|
||||
REPO_URL=https://github.com/gyptazy/ProxLB.git
|
||||
BUILD_DIR=/workspace/build
|
||||
PACKAGE_DIR=workspace/packages
|
||||
REPO_DIR=/workspace/ProxLB
|
||||
|
||||
.PHONY: all clean download prepare build package
|
||||
|
||||
# Default target
|
||||
all: download prepare build package
|
||||
|
||||
# Clone the repository if not already cloned
|
||||
download:
|
||||
@if [ ! -d "$(REPO_DIR)" ]; then \
|
||||
echo "Cloning repository..."; \
|
||||
git clone $(REPO_URL) $(REPO_DIR); \
|
||||
fi
|
||||
|
||||
# Prepare directories
|
||||
prepare: download
|
||||
mkdir -p $(PACKAGE_DIR)
|
||||
mkdir -p $(BUILD_DIR)
|
||||
cd $(REPO_DIR) && git checkout v$(VERSION)
|
||||
|
||||
# Build the project
|
||||
build: prepare
|
||||
cd $(BUILD_DIR) && cmake $(REPO_DIR)/packaging
|
||||
|
||||
# Package the project
|
||||
package: build
|
||||
cd $(BUILD_DIR) && cpack -G RPM .
|
||||
cp $(BUILD_DIR)/*.rpm $(PACKAGE_DIR)
|
||||
|
||||
# Clean up build and package directories
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(PACKAGE_DIR)
|
||||
rm -rf $(REPO_DIR)
|
||||
42
README.md
42
README.md
@ -0,0 +1,42 @@
|
||||
# ProxLB: RPM Packaging
|
||||
|
||||
## Overview
|
||||
|
||||
This project provides a Makefile and script to build an RPM package for the ProxLB software. The Makefile automates the process of cloning the ProxLB repository, configuring the build environment with CMake, compiling the source code, and packaging the application into an RPM. This makes it easy to deploy ProxLB in environments that use RPM-based package management.
|
||||
|
||||
## Features
|
||||
|
||||
- **Automated Build and Packaging**: Uses a Makefile to streamline the process of cloning the repository, creating build directories, compiling the source code, and generating an RPM package.
|
||||
- **Easy Deployment**: The generated RPM package can be easily installed on any system that supports RPM, simplifying the deployment process for ProxLB.
|
||||
- **Customisable**: The Makefile can be modified to adjust build configurations, target different versions, or alter the packaging process as needed.
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Git**: To clone the ProxLB repository.
|
||||
- **CMake**: For configuring the build system.
|
||||
- **CPack**: To create the RPM package.
|
||||
|
||||
## Installation
|
||||
|
||||
1. **Clone the Repository**: Download this repository to your local machine.
|
||||
```bash
|
||||
git clone https://git.query.consul/unkin/rpmbuild-proxlb.git
|
||||
cd rpmbuild-proxlb
|
||||
```
|
||||
|
||||
2. **Prepare the Environment**: Ensure all dependencies (Git, CMake, CPack and RPM) are installed on your system.
|
||||
|
||||
3. **Build and Package**: Run the Makefile to build and package ProxLB.
|
||||
```bash
|
||||
make package
|
||||
```
|
||||
|
||||
4. **Clean Up**: Optionally, run `make clean` to remove all generated files and directories.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
This project is maintained by the community. Thanks to all contributors!
|
||||
Reference in New Issue
Block a user