Compare commits

...

5 Commits

Author SHA1 Message Date
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
3 changed files with 26 additions and 21 deletions
+23 -18
View File
@@ -1,28 +1,17 @@
kind: pipeline
type: docker
name: default
name: almalinux8
trigger:
branch:
- master
event:
include:
- push
- pull_request
steps:
- name: build
image: almalinux:8.10
image: git.query.consul/unkin/almalinux8:latest
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
@@ -31,4 +20,20 @@ steps:
- 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
- make build
- name: upload
image: git.query.consul/unkin/almalinux8:latest
environment:
GITEA_PASSWORD:
from_secret: gitea_password
commands:
- >
for rpm in /drone/src/rpmbuild/RPMS/*/*.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
+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: