Merge pull request 'feat: add deploy steps' (#2) from neoloc/add_deploy_step into master
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: https://git.query.consul/unkin/rpmbuild-gonic/pulls/2
This commit is contained in:
commit
23a12aa026
26
.drone.yml
26
.drone.yml
@ -3,11 +3,13 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
event:
|
||||||
- master
|
include:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build_el8
|
||||||
image: almalinux:8.10
|
image: almalinux:8.10
|
||||||
commands:
|
commands:
|
||||||
# Remove default repos
|
# Remove default repos
|
||||||
@ -31,4 +33,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_el8
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
environment:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_package_token
|
||||||
|
commands:
|
||||||
|
- >
|
||||||
|
for rpm in /drone/src/rpmbuild/RPMS/*/*.rpm; do
|
||||||
|
curl --user droneci:${GITEA_TOKEN} --upload-file $rpm https://git.query.consul/api/v1/packages/unkin/rpm/almalinux/el8/upload
|
||||||
|
done
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|||||||
4
Makefile
4
Makefile
@ -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