Skip to content

Commit

Permalink
ci: build releases based on golang:1.19-bullseye (#264)
Browse files Browse the repository at this point in the history
* ci: build releases based on golang:1.19-bullseye

Signed-off-by: Nick Sieger <[email protected]>

* ci: use rolling remote docker version

Signed-off-by: Nick Sieger <[email protected]>

* release: build with CGO_ENABLED=0

Signed-off-by: Nick Sieger <[email protected]>

Signed-off-by: Nick Sieger <[email protected]>
  • Loading branch information
nicksieger authored Nov 4, 2022
1 parent de2b9b8 commit 1392a15
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
25 changes: 17 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
- image: docker/tilt-ctlptl-ci@sha256:a06365a5d76f900883950aeec65d5a3cd49a96ee750a327ac34c3f4850298ee3
steps:
- checkout
- setup_remote_docker:
version: 20.10.14
- setup_remote_docker
- run: make install
- run: test/kind-cluster-network/e2e.sh

Expand Down Expand Up @@ -71,34 +70,44 @@ jobs:

release-dry-run:
docker:
- image: cimg/go:1.19
- image: golang:1.19-bullseye
environment:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
- checkout
- setup_remote_docker:
version: 20.10.14
- setup_remote_docker
# https://discuss.circleci.com/t/arm-version-of-remote-docker/41624
- run: ssh remote-docker "sudo apt-get update; sudo apt-get install -y qemu-user-static binfmt-support"
- run: git fetch --tags
- run: go install github.com/goreleaser/goreleaser@latest
- run: |
pushd /tmp
curl -O https://download.docker.com/linux/debian/dists/bullseye/pool/stable/amd64/docker-ce-cli_20.10.17~3-0~debian-bullseye_amd64.deb
dpkg -i *.deb
rm -f *.deb
popd
- run: goreleaser --debug --rm-dist --skip-publish --snapshot
- slack/notify-on-failure:
only_for_branches: main

release:
docker:
- image: cimg/go:1.19
- image: golang:1.19-bullseye
environment:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
- checkout
- setup_remote_docker:
version: 20.10.14
- setup_remote_docker
# https://discuss.circleci.com/t/arm-version-of-remote-docker/41624
- run: ssh remote-docker "sudo apt-get update; sudo apt-get install -y qemu-user-static binfmt-support"
- run: git fetch --tags
- run: go install github.com/goreleaser/goreleaser@latest
- run: |
pushd /tmp
curl -O https://download.docker.com/linux/debian/dists/bullseye/pool/stable/amd64/docker-ce-cli_20.10.17~3-0~debian-bullseye_amd64.deb
dpkg -i *.deb
rm -f *.deb
popd
- run: ./hack/release.sh
- slack/status:
mentions: "nick"
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ builds:
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
# https://goreleaser.com/deprecations/#builds-for-windowsarm64
ignore:
- goos: windows
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GOPATH = $(shell go env GOPATH)
.PHONY: generate test vendor publish-ci-image

install:
go install ./cmd/ctlptl
CGO_ENABLED=0 go install ./cmd/ctlptl

test:
go test -timeout 30s -v ./...
Expand Down

0 comments on commit 1392a15

Please sign in to comment.