Skip to content

Commit 0f462b8

Browse files
authored
Move to a GCP agent the release step (#1194)
1 parent 3818eaf commit 0f462b8

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ steps:
5757

5858
- label: ":github: Release"
5959
key: "release"
60-
# build.tag != null && build.branch == "main"
6160
if: |
6261
build.tag =~ /^v[0-9]+[.][0-9]+[.][0-9]+$$/
6362
command: ".buildkite/scripts/release.sh"
6463
agents:
65-
image: "golang:1.19.5"
66-
cpu: "4"
67-
memory: "16G"
64+
provider: "gcp"

.buildkite/scripts/install_deps.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
source .buildkite/scripts/tooling.sh
66

77
add_bin_path(){
8+
mkdir -p ${WORKSPACE}/bin
89
export PATH="${WORKSPACE}/bin:${PATH}"
910
}
1011

.buildkite/scripts/release.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
set -euo pipefail
44

5+
cleanup() {
6+
rm -rf ${WORKSPACE}
7+
}
8+
trap cleanup exit
9+
10+
WORKSPACE="/tmp/bin-buildkite/"
11+
12+
VERSION=""
13+
source .buildkite/scripts/install_deps.sh
14+
source .buildkite/scripts/tooling.sh
15+
16+
add_bin_path
17+
with_go
18+
519
echo "--- fetching tags"
620
# Ensure that tags are present so goreleaser can build the changelog from the last release.
721
git rev-parse --is-shallow-repository
@@ -10,4 +24,3 @@ git fetch origin --tags
1024
echo "--- running goreleaser"
1125
# Run latest version of goreleaser
1226
curl -sL https://git.io/goreleaser | bash
13-

0 commit comments

Comments
 (0)