Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92aa1c3edc | |||
| ac56acf136 | |||
| 23a12aa026 | |||
| 6160593395 | |||
| 77decc49f5 |
+23
-18
@@ -1,28 +1,17 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: almalinux8
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
event:
|
||||||
- master
|
include:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: almalinux:8.10
|
image: git.query.consul/unkin/almalinux8:latest
|
||||||
commands:
|
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
|
# 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/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
|
- 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
|
- dnf install -y golang gcc gcc-c++ make git sqlite-devel taglib-devel ffmpeg mpv rpmdevtools wget systemd sqlite taglib
|
||||||
|
|
||||||
# Run the `make` command
|
# 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
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.PHONY: all prep download build clean
|
.PHONY: all prep download build clean
|
||||||
|
|
||||||
RPMBUILD := $(HOME)/rpmbuild
|
RPMBUILD := /drone/src/rpmbuild
|
||||||
SOURCES := $(RPMBUILD)/SOURCES
|
SOURCES := $(RPMBUILD)/SOURCES
|
||||||
SPECS := $(RPMBUILD)/SPECS
|
SPECS := $(RPMBUILD)/SPECS
|
||||||
SPECFILE := gonic.spec
|
SPECFILE := gonic.spec
|
||||||
@@ -23,7 +23,7 @@ download: prep
|
|||||||
|
|
||||||
build: $(SPECFILE) download
|
build: $(SPECFILE) download
|
||||||
@echo "Building RPM..."
|
@echo "Building RPM..."
|
||||||
@rpmbuild -ba $(SPECFILE)
|
@rpmbuild -ba --define "_topdir $(RPMBUILD)" $(SPECFILE)
|
||||||
@echo "RPM built."
|
@echo "RPM built."
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user