Compare commits

..

6 Commits

Author SHA1 Message Date
unkinben 4122549250 Change to gitea actions
Build and Upload RPMs / Build on AlmaLinux 8 (pull_request) Failing after 17s
Build and Upload RPMs / Upload RPMs (pull_request) Has been skipped
- remove .drone.yml
- create .gitea/workflows/deploy.yaml
- install node in default container
2024-09-07 18:35:43 +10:00
unkinben 92aa1c3edc Merge pull request 'chore: update drone settings' (#3) from neoloc/use_internal_docker into master
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.query.consul/unkin/rpmbuild-gonic/pulls/3
2024-08-26 22:57:33 +10:00
unkinben ac56acf136 chore: update drone settings
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is pending
- change pipeline name
- change step names
- change container to use
2024-08-26 22:34:34 +10:00
unkinben 23a12aa026 Merge pull request 'feat: add deploy steps' (#2) from neoloc/add_deploy_step into master
continuous-integration/drone/push Build is failing
Reviewed-on: https://git.query.consul/unkin/rpmbuild-gonic/pulls/2
2024-08-25 16:00:30 +10:00
unkinben 6160593395 feat: add deploy steps
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- add deployment steps to droneci
- update makefile to use droneci workspace
2024-08-25 15:17:23 +10:00
unkinben 77decc49f5 Merge pull request 'feat: updating droneci tasks' (#1) from neoloc/droneci into master
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.query.consul/unkinben/rpmbuild-gonic/pulls/1
2024-08-25 14:14:37 +10:00
4 changed files with 55 additions and 37 deletions
-34
View File
@@ -1,34 +0,0 @@
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
steps:
- name: build
image: almalinux:8.10
commands:
# Remove default repos
- rm -rf /etc/yum.repos.d/*.repo
# Add edgecache repos
- echo -e "[epel]\nname=epel repository\nbaseurl=http://edgecache.query.consul/epel/8/Everything/x86_64\ngpgkey=http://edgecache.query.consul/epel/RPM-GPG-KEY-EPEL-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/epel.repo
- echo -e "[baseos]\nname=baseos repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/BaseOS/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/baseos.repo
- echo -e "[appstream]\nname=appstream repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/AppStream/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/appstream.repo
- echo -e "[powertools]\nname=powertools repository\nbaseurl=http://edgecache.query.consul/almalinux/8.10/PowerTools/x86_64/os\ngpgkey=http://edgecache.query.consul/almalinux/RPM-GPG-KEY-AlmaLinux-8\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/powertools.repo
# Clean and update repository cache
- dnf clean all
- dnf makecache
# Install RPMFusion
- dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
- dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
# Install the required packages using custom repositories
- dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
# Run the `make` command
- make
+52
View File
@@ -0,0 +1,52 @@
name: Build and Upload RPMs
on:
push:
branches:
- master
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 nodejs:20
dnf install -y nodejs
- name: Checkout code
uses: actions/checkout@v3
- name: Install RPMFusion
run: |
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
- name: Install required packages
run: |
dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
- name: Build project
run: make build
upload:
name: Upload RPMs
runs-on: almalinux-8
needs: build
container:
image: git.query.consul/unkin/almalinux8:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Upload RPMs to Gitea
env:
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
run: |
for rpm in /drone/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
+2 -2
View File
@@ -1,6 +1,6 @@
.PHONY: all prep download build clean
RPMBUILD := $(HOME)/rpmbuild
RPMBUILD := /drone/src/rpmbuild
SOURCES := $(RPMBUILD)/SOURCES
SPECS := $(RPMBUILD)/SPECS
SPECFILE := gonic.spec
@@ -23,7 +23,7 @@ download: prep
build: $(SPECFILE) download
@echo "Building RPM..."
@rpmbuild -ba $(SPECFILE)
@rpmbuild -ba --define "_topdir $(RPMBUILD)" $(SPECFILE)
@echo "RPM built."
clean:
+1 -1
View File
@@ -15,7 +15,7 @@ Requires: golang, git, sqlite, taglib, ffmpeg, mpv, systemd
%description
Gonic is a lightweight music streaming server written in Go.
%global debug_package %{nil}
%global debug_package %{nil}
%prep
%autosetup -n %{name}-%{version}