Refactor deb build and remove git pull before build
This commit is contained in:
parent
0a0bcd5e93
commit
5b98b6b136
1 changed files with 8 additions and 11 deletions
|
@ -25,7 +25,6 @@ lint:
|
||||||
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
||||||
- cp -r * /go/src/gitlab.com/signald/signald-go
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
||||||
script:
|
script:
|
||||||
- (git checkout "${CI_COMMIT_BRANCH}" && git pull) || true
|
|
||||||
- VERSION="$(./version.sh)"
|
- VERSION="$(./version.sh)"
|
||||||
- echo "building ${VERSION}"
|
- echo "building ${VERSION}"
|
||||||
- cd /go/src/gitlab.com/signald/signald-go
|
- cd /go/src/gitlab.com/signald/signald-go
|
||||||
|
@ -43,7 +42,7 @@ lint:
|
||||||
- apt-get update
|
- 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 -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
|
- 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 doc -o man
|
||||||
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
||||||
- ls *.1 > debian/manpages
|
- ls *.1 > debian/manpages
|
||||||
|
@ -93,7 +92,6 @@ build:cross-compile:
|
||||||
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
||||||
- cp -r * /go/src/gitlab.com/signald/signald-go
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
||||||
script:
|
script:
|
||||||
- (git checkout "${CI_COMMIT_BRANCH}" && git pull)|| true
|
|
||||||
- VERSION="$(./version.sh)"
|
- VERSION="$(./version.sh)"
|
||||||
- echo "building ${VERSION}"
|
- echo "building ${VERSION}"
|
||||||
- cd /go/src/gitlab.com/signald/signald-go
|
- cd /go/src/gitlab.com/signald/signald-go
|
||||||
|
@ -117,23 +115,23 @@ build:cross-compile:
|
||||||
|
|
||||||
build:x86:deb:
|
build:x86:deb:
|
||||||
extends: .build-deb
|
extends: .build-deb
|
||||||
before_script:
|
|
||||||
- "sed -i 's/^Architecture:.*/Architecture: amd64/g' debian/control"
|
|
||||||
rules:
|
rules:
|
||||||
- when: on_success
|
- when: on_success
|
||||||
|
variables:
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
build:aarch64:deb:
|
build:aarch64:deb:
|
||||||
extends: .build-deb
|
extends: .build-deb
|
||||||
tags: [arm-builder]
|
tags: [arm-builder]
|
||||||
before_script:
|
variables:
|
||||||
- "sed -i 's/^Architecture:.*/Architecture: arm64/g' debian/control"
|
ARCH: arm64
|
||||||
|
|
||||||
build:armhf:deb:
|
build:armhf:deb:
|
||||||
extends: .build-deb
|
extends: .build-deb
|
||||||
image: arm32v7/debian:latest
|
image: arm32v7/debian:latest
|
||||||
tags: [arm-builder]
|
tags: [arm-builder]
|
||||||
before_script:
|
variables:
|
||||||
- "sed -i 's/^Architecture:.*/Architecture: armhf/g' debian/control"
|
ARCH: armhf
|
||||||
|
|
||||||
publish deb:
|
publish deb:
|
||||||
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
|
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
|
||||||
|
@ -163,4 +161,3 @@ signald.org:
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PROJECT_NAMESPACE == "signald" && $CI_COMMIT_REF_PROTECTED == "true"'
|
- if: '$CI_PROJECT_NAMESPACE == "signald" && $CI_COMMIT_REF_PROTECTED == "true"'
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
Loading…
Reference in a new issue