Refactor deb build and remove git pull before build

This commit is contained in:
Finn 2021-08-07 13:16:49 -07:00
parent 0a0bcd5e93
commit 5b98b6b136

View file

@ -25,7 +25,6 @@ lint:
- mkdir -p /go/src/gitlab.com/signald/signald-go
- cp -r * /go/src/gitlab.com/signald/signald-go
script:
- (git checkout "${CI_COMMIT_BRANCH}" && git pull) || true
- VERSION="$(./version.sh)"
- echo "building ${VERSION}"
- cd /go/src/gitlab.com/signald/signald-go
@ -43,7 +42,7 @@ lint:
- apt-get update
- apt-get install -y -t buster-backports git-buildpackage dh-golang bash-completion golang-any golang-github-spf13-cobra-dev golang-github-spf13-viper-dev
- apt-get install -y ./*.deb && rm -vf *.deb
- (git checkout "${CI_COMMIT_BRANCH}" && git pull) || true
- 'sed -i "s/^Architecture:.*/Architecture: ${ARCH}/g" debian/control'
- go run ./cmd/signaldctl doc -o man
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
- ls *.1 > debian/manpages
@ -93,7 +92,6 @@ build:cross-compile:
- mkdir -p /go/src/gitlab.com/signald/signald-go
- cp -r * /go/src/gitlab.com/signald/signald-go
script:
- (git checkout "${CI_COMMIT_BRANCH}" && git pull)|| true
- VERSION="$(./version.sh)"
- echo "building ${VERSION}"
- cd /go/src/gitlab.com/signald/signald-go
@ -117,23 +115,23 @@ build:cross-compile:
build:x86:deb:
extends: .build-deb
before_script:
- "sed -i 's/^Architecture:.*/Architecture: amd64/g' debian/control"
rules:
- when: on_success
variables:
ARCH: amd64
build:aarch64:deb:
extends: .build-deb
tags: [arm-builder]
before_script:
- "sed -i 's/^Architecture:.*/Architecture: arm64/g' debian/control"
variables:
ARCH: arm64
build:armhf:deb:
extends: .build-deb
image: arm32v7/debian:latest
tags: [arm-builder]
before_script:
- "sed -i 's/^Architecture:.*/Architecture: armhf/g' debian/control"
variables:
ARCH: armhf
publish deb:
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
@ -162,5 +160,4 @@ signald.org:
trigger: signald/signald.org
rules:
- if: '$CI_PROJECT_NAMESPACE == "signald" && $CI_COMMIT_REF_PROTECTED == "true"'
when: on_success
when: on_success