Skip to content

Commit

Permalink
Move to a GCP agent the release step (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm authored Mar 21, 2023
1 parent 3818eaf commit 0f462b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@ steps:

- label: ":github: Release"
key: "release"
# build.tag != null && build.branch == "main"
if: |
build.tag =~ /^v[0-9]+[.][0-9]+[.][0-9]+$$/
command: ".buildkite/scripts/release.sh"
agents:
image: "golang:1.19.5"
cpu: "4"
memory: "16G"
provider: "gcp"
1 change: 1 addition & 0 deletions .buildkite/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail
source .buildkite/scripts/tooling.sh

add_bin_path(){
mkdir -p ${WORKSPACE}/bin
export PATH="${WORKSPACE}/bin:${PATH}"
}

Expand Down
15 changes: 14 additions & 1 deletion .buildkite/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

set -euo pipefail

cleanup() {
rm -rf ${WORKSPACE}
}
trap cleanup exit

WORKSPACE="/tmp/bin-buildkite/"

VERSION=""
source .buildkite/scripts/install_deps.sh
source .buildkite/scripts/tooling.sh

add_bin_path
with_go

echo "--- fetching tags"
# Ensure that tags are present so goreleaser can build the changelog from the last release.
git rev-parse --is-shallow-repository
Expand All @@ -10,4 +24,3 @@ git fetch origin --tags
echo "--- running goreleaser"
# Run latest version of goreleaser
curl -sL https://git.io/goreleaser | bash

0 comments on commit 0f462b8

Please sign in to comment.