Fix release pipeline

This commit is contained in:
s3lph 2022-10-14 02:35:45 +02:00
parent 0b621bda61
commit 35ac45b536
2 changed files with 4 additions and 8 deletions

View file

@ -1,11 +1,6 @@
---
image: golang:1.19
before_script:
- export PDE_FULL_VERSION=$(git describe --tags --dirty | sed -re s/^v//)
- export PDE_VERSION=$(echo $PDE_FULL_VERSION | cut -d- -f1)
- export PDE_REVISION=$(echo $PDE_FULL_VERSION | cut -d- -f2-)
- go get -v
stages:
- test
@ -15,10 +10,12 @@ stages:
compile:
stage: test
script:
- make prometheus-dnssec-exporter
- go get -v
- make prometheus-dnssec-exporter .changes
artifacts:
paths:
- prometheus-dnssec-exporter
- .changes
golangci-lint:
stage: test
@ -30,7 +27,6 @@ release:
image: debian:bullseye
stage: release
script:
- make .changes
- python package/release.py
only:
- tags

View file

@ -4,7 +4,7 @@ PDE_REVISION=$$(git describe --tags --dirty | cut -d- -f2-)
LD_VERSION=-X 'github.com/prometheus/common/version.Version=$(PDE_VERSION)'
LD_REVISION=-X 'github.com/prometheus/common/version.Revision=$(PDE_REVISION)'
LD_BRANCH=-X 'github.com/prometheus/common/version.Branch=$$(git branch | grep '*' | cut -d ' ' -f 2-)'
LD_BRANCH=-X 'github.com/prometheus/common/version.Branch=$(CI_COMMIT_REF_NAME)'
LD_USER=-X 'github.com/prometheus/common/version.BuildUser=$$(whoami)@$$(hostname -f)'
LD_DATE=-X 'github.com/prometheus/common/version.BuildDate=$$(date --iso-8601=seconds)'
LDFLAGS=-s $(LD_VERSION) $(LD_REVISION) $(LD_BRANCH) $(LD_USER) $(LD_DATE)