Skip to content

Commit

Permalink
Stop building multi arch binaries for cli snapshot (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok authored Feb 13, 2024
1 parent efcab7f commit 2e1a39d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
key: ${{ runner.os }}-botkube-cli

- name: Build CLI
run: make release-snapshot-cli
run: make build-single-arch-cli

- name: Add Botkube CLI to env
run: |
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
access_token: ${{ secrets.E2E_TEST_GH_DEV_ACCOUNT_PAT }}
username: ${{ env.GIT_USER }}
- name: Run GoReleaser
run: make release-snapshot-cli
run: make build-single-arch-cli
- name: Add botkube alias
run: |
echo BOTKUBE_BINARY_PATH="$PWD/dist/botkube-cli_linux_amd64_v1/botkube" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ jobs:
key: ${{ runner.os }}-botkube-cli

- name: Build CLI
run: make release-snapshot-cli
run: make build-single-arch-cli

- name: Add Botkube CLI to env
run: |
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ container-image-single: pre-build
release-snapshot:
@./hack/goreleaser.sh release_snapshot

build-single-arch-cli:
@./hack/goreleaser.sh build_single_arch_cli

release-snapshot-cli:
@./hack/goreleaser.sh release_snapshot_cli
@./hack/goreleaser.sh build_single_arch_cli

# Build project and save images with IMAGE_TAG tag
save-images:
Expand Down
11 changes: 5 additions & 6 deletions hack/goreleaser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ release_snapshot() {
docker manifest push ${IMAGE_REGISTRY}/${CFG_EXPORTER_IMAGE_REPOSITORY}:${GORELEASER_CURRENT_TAG}
}

release_snapshot_cli() {
prepare
build_single_arch_cli() {
export GORELEASER_CURRENT_TAG=v9.99.9-dev
goreleaser build --clean --snapshot --id botkube-cli
goreleaser build --clean --snapshot --id botkube-cli --single-target
}

save_images() {
Expand Down Expand Up @@ -247,7 +246,7 @@ build_single() {

usage() {
cat <<EOM
Usage: ${0} [build|release|release_snapshot|release_snapshot_cli]
Usage: ${0} [build|release|release_snapshot|build_single_arch_cli]
Where,
build: Builds project with goreleaser without pushing images.
release_snapshot: Builds project without publishing release. It builds and pushes Botkube image with v9.99.9-dev image tag.
Expand All @@ -272,8 +271,8 @@ build_single)
release_snapshot)
release_snapshot
;;
release_snapshot_cli)
release_snapshot_cli
build_single_arch_cli)
build_single_arch_cli
;;
save_images)
save_images
Expand Down

0 comments on commit 2e1a39d

Please sign in to comment.