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
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
- name: build_el8
|
||||
image: almalinux:8.10
|
||||
commands:
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user