Standardize the deb build template
This commit is contained in:
parent
460fef2f0e
commit
235ec55978
1 changed files with 34 additions and 60 deletions
|
@ -33,6 +33,37 @@ lint:
|
||||||
- signaldctl
|
- signaldctl
|
||||||
expire_in: 1 month
|
expire_in: 1 month
|
||||||
|
|
||||||
|
.build-deb:
|
||||||
|
stage: build
|
||||||
|
image: debian:latest
|
||||||
|
script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y 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}" || true
|
||||||
|
- go run ./cmd/signaldctl doc -o man
|
||||||
|
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
||||||
|
- ls *.1 > debian/manpages
|
||||||
|
- gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="$(git describe --abbrev=0 HEAD)+git$(date +%Y-%m-%d)r$(git rev-parse --short=8 HEAD).$(git rev-list $(git describe --abbrev=0 HEAD)..HEAD --count)"
|
||||||
|
- dpkg-buildpackage -us -uc -b
|
||||||
|
- mv ../*.deb .
|
||||||
|
needs:
|
||||||
|
- project: signald/libraries/golang-github-mdp-qrterminal
|
||||||
|
job: build
|
||||||
|
ref: master
|
||||||
|
artifacts: true
|
||||||
|
- project: signald/libraries/golang-github-jedib0t-go-pretty
|
||||||
|
job: build
|
||||||
|
ref: master
|
||||||
|
artifacts: true
|
||||||
|
variables:
|
||||||
|
SIGNALDCTL_PUBLIC_DOC_MODE: "on"
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- "*.deb"
|
||||||
|
- "*.1"
|
||||||
|
expire_in: 1 month
|
||||||
|
|
||||||
build:x86:
|
build:x86:
|
||||||
extends: .build
|
extends: .build
|
||||||
|
|
||||||
|
@ -72,72 +103,15 @@ build:cross-compile:
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
|
|
||||||
build:x86:deb:
|
build:x86:deb:
|
||||||
stage: build
|
extends: .build-deb
|
||||||
image: debian:latest
|
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update
|
|
||||||
- apt-get install -y 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
|
|
||||||
- "sed -i 's/^Architecture:.*/Architecture: amd64/g' debian/control"
|
- "sed -i 's/^Architecture:.*/Architecture: amd64/g' debian/control"
|
||||||
script:
|
|
||||||
- git checkout "${CI_COMMIT_BRANCH}" || true
|
|
||||||
- go run ./cmd/signaldctl doc -o man
|
|
||||||
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
|
||||||
- ls *.1 > debian/manpages
|
|
||||||
- gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="$(git describe --abbrev=0 HEAD)+git$(date +%Y-%m-%d)r$(git rev-parse --short=8 HEAD).$(git rev-list $(git describe --abbrev=0 HEAD)..HEAD --count)"
|
|
||||||
- dpkg-buildpackage -us -uc -b
|
|
||||||
- mv ../*.deb .
|
|
||||||
needs:
|
|
||||||
- project: signald/libraries/golang-github-mdp-qrterminal
|
|
||||||
job: build
|
|
||||||
ref: master
|
|
||||||
artifacts: true
|
|
||||||
- project: signald/libraries/golang-github-jedib0t-go-pretty
|
|
||||||
job: build
|
|
||||||
ref: master
|
|
||||||
artifacts: true
|
|
||||||
variables:
|
|
||||||
SIGNALDCTL_PUBLIC_DOC_MODE: "on"
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- "*.deb"
|
|
||||||
- "*.1"
|
|
||||||
expire_in: 1 month
|
|
||||||
|
|
||||||
build:aarch64:deb:
|
build:aarch64:deb:
|
||||||
stage: build
|
extends: .build-deb
|
||||||
image: debian:latest
|
|
||||||
tags: [arm-builder]
|
tags: [arm-builder]
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update
|
|
||||||
- apt-get install -y 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
|
|
||||||
- "sed -i 's/^Architecture:.*/Architecture: arm64/g' debian/control"
|
- "sed -i 's/^Architecture:.*/Architecture: arm64/g' debian/control"
|
||||||
script:
|
|
||||||
- git checkout "${CI_COMMIT_BRANCH}" || true
|
|
||||||
- go run ./cmd/signaldctl doc -o man
|
|
||||||
- go run ./cmd/signaldctl completion bash > debian/package.bash-completion
|
|
||||||
- ls *.1 > debian/manpages
|
|
||||||
- gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="$(git describe --abbrev=0 HEAD)+git$(date +%Y-%m-%d)r$(git rev-parse --short=8 HEAD).$(git rev-list $(git describe --abbrev=0 HEAD)..HEAD --count)"
|
|
||||||
- dpkg-buildpackage -us -uc -b
|
|
||||||
- mv ../*.deb .
|
|
||||||
needs:
|
|
||||||
- project: signald/libraries/golang-github-mdp-qrterminal
|
|
||||||
job: build
|
|
||||||
ref: master
|
|
||||||
artifacts: true
|
|
||||||
- project: signald/libraries/golang-github-jedib0t-go-pretty
|
|
||||||
job: build
|
|
||||||
ref: master
|
|
||||||
artifacts: true
|
|
||||||
variables:
|
|
||||||
SIGNALDCTL_PUBLIC_DOC_MODE: "on"
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- "*.deb"
|
|
||||||
- "*.1"
|
|
||||||
expire_in: 1 month
|
|
||||||
|
|
||||||
|
|
||||||
publish deb:
|
publish deb:
|
||||||
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
|
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
|
||||||
|
|
Loading…
Reference in a new issue