2018-10-09 00:37:39 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2021-01-30 04:26:54 +00:00
|
|
|
- publish
|
2018-10-09 00:37:39 +00:00
|
|
|
|
|
|
|
lint:
|
2020-10-13 05:24:11 +00:00
|
|
|
image: nixery.dev/shell/diffutils/go/golangci-lint
|
2020-11-22 08:26:30 +00:00
|
|
|
stage: build
|
2018-10-09 00:39:16 +00:00
|
|
|
before_script:
|
2020-11-22 08:26:30 +00:00
|
|
|
- cp /share/go/bin/go /bin && mkdir /tmp # fix weirdness from nixery image
|
2020-10-13 05:24:11 +00:00
|
|
|
- mkdir -p /go/src/src/gitlab.com/signald/signald-go
|
|
|
|
- cp -r * /go/src/src/gitlab.com/signald/signald-go
|
|
|
|
- cd /go/src/src/gitlab.com/signald/signald-go
|
2018-10-09 00:37:39 +00:00
|
|
|
script:
|
2020-11-22 08:26:30 +00:00
|
|
|
- golangci-lint run
|
2020-10-13 05:24:11 +00:00
|
|
|
- go mod tidy
|
|
|
|
- diff --color=always go.mod "${CI_PROJECT_DIR}/go.mod"
|
|
|
|
- diff --color=always go.sum "${CI_PROJECT_DIR}/go.sum"
|
2018-10-09 00:37:39 +00:00
|
|
|
|
2020-12-13 02:43:30 +00:00
|
|
|
build:x86:
|
2018-10-09 00:37:39 +00:00
|
|
|
stage: build
|
|
|
|
image: golang:latest
|
2018-10-09 00:39:16 +00:00
|
|
|
before_script:
|
2020-10-13 05:24:11 +00:00
|
|
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cd /go/src/gitlab.com/signald/signald-go
|
2018-10-09 00:37:39 +00:00
|
|
|
script:
|
2020-12-13 00:33:29 +00:00
|
|
|
- go build -o "${CI_PROJECT_DIR}/signaldctl" ./cmd/signaldctl
|
2018-10-09 00:37:39 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2020-12-13 00:33:29 +00:00
|
|
|
- signaldctl
|
2018-10-09 00:37:39 +00:00
|
|
|
expire_in: 1 month
|
2020-12-13 02:43:30 +00:00
|
|
|
|
|
|
|
build:aarch64:
|
|
|
|
stage: build
|
2020-12-13 02:45:03 +00:00
|
|
|
tags: [arm-builder]
|
2020-12-13 02:43:30 +00:00
|
|
|
image: golang:latest
|
|
|
|
before_script:
|
|
|
|
- mkdir -p /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cp -r * /go/src/gitlab.com/signald/signald-go
|
|
|
|
- cd /go/src/gitlab.com/signald/signald-go
|
|
|
|
script:
|
|
|
|
- go build -o "${CI_PROJECT_DIR}/signaldctl" ./cmd/signaldctl
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- signaldctl
|
2021-01-30 04:26:54 +00:00
|
|
|
expire_in: 1 month
|
|
|
|
|
|
|
|
build:x86:deb:
|
|
|
|
stage: build
|
|
|
|
image: debian:latest
|
|
|
|
before_script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y dpkg-dev dh-golang golang-any golang-github-spf13-cobra-dev golang-github-spf13-viper-dev
|
|
|
|
- apt-get install -y ./*.deb
|
|
|
|
script:
|
|
|
|
- dpkg-buildpackage -us -uc -b
|
|
|
|
- mv ../signald-go_* .
|
|
|
|
needs:
|
|
|
|
- project: signald/qrterminal
|
|
|
|
job: build
|
|
|
|
ref: master
|
|
|
|
artifacts: true
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "signald-go_*"
|
|
|
|
expire_in: 1 month
|
|
|
|
|
|
|
|
publish:
|
|
|
|
image: registry.gitlab.com/signald/infrastructure/signald-builder-x86:d5e68709
|
|
|
|
stage: publish
|
|
|
|
tags: [deb-signer]
|
|
|
|
needs: ["build:x86:deb"]
|
|
|
|
script:
|
|
|
|
- aptly repo create signald
|
|
|
|
- aptly mirror create -ignore-signatures backfill-mirror https://updates.signald.org "${DISTRIBUTION}" main
|
|
|
|
- aptly mirror update -ignore-signatures backfill-mirror
|
|
|
|
- aptly repo import backfill-mirror signald signald
|
|
|
|
- aptly repo add signald *.deb
|
|
|
|
- aptly publish repo -config=.aptly.conf -batch -gpg-key="${SIGNING_KEY}" -distribution="${DISTRIBUTION}" "signald" "s3:updates.signald.org:"
|
|
|
|
variables:
|
|
|
|
DISTRIBUTION: unstable
|
|
|
|
only:
|
|
|
|
- main
|
|
|
|
- tags
|