Skip to content

Commit 5401bab

Browse files
committed
tmp-release-test
1 parent 920f317 commit 5401bab

File tree

5 files changed

+60
-127
lines changed

5 files changed

+60
-127
lines changed

.buildkite/pipeline-for-tags.yml

+44-106
Original file line numberDiff line numberDiff line change
@@ -8,78 +8,10 @@ env:
88

99

1010
steps:
11-
- label: Check for new Octez release
12-
if: build.source == "schedule" && build.branch == "master"
13-
commands:
14-
- nix develop .#autorelease -c ./scripts/update-tezos.sh
15-
16-
- label: Build ubuntu source packages
17-
key: build-ubuntu-source-packages
18-
if: build.tag =~ /^v.*-1/
19-
agents:
20-
queue: "docker"
21-
commands:
22-
- eval "$SET_VERSION"
23-
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source
24-
artifact_paths:
25-
- ./out/*
26-
27-
- label: Build fedora source packages
28-
key: build-fedora-source-packages
29-
if: build.tag =~ /^v.*-1/
30-
agents:
31-
queue: "docker"
32-
commands:
33-
- eval "$SET_VERSION"
34-
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type source
35-
artifact_paths:
36-
- ./out/*
37-
38-
- label: Sign ubuntu source packages
39-
if: build.tag =~ /^v.*-1/
40-
depends_on:
41-
- "build-ubuntu-source-packages"
42-
key: sign-ubuntu-source-packages
43-
commands:
44-
- eval "$SET_VERSION"
45-
- buildkite-agent artifact download "out/*" . --step build-ubuntu-source-packages
46-
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/sign.py -d out -i 'Serokell <[email protected]>'
47-
artifact_paths:
48-
- ./out/*
49-
50-
- label: Sign fedora source packages
51-
if: build.tag =~ /^v.*-1/
52-
depends_on:
53-
- "build-fedora-source-packages"
54-
key: sign-fedora-source-packages
55-
commands:
56-
- eval "$SET_VERSION"
57-
- buildkite-agent artifact download "out/*" . --step build-fedora-source-packages
58-
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/sign.py -d out -i 'Serokell <[email protected]>'
59-
artifact_paths:
60-
- ./out/*
61-
62-
- label: Publish ubuntu native packages
63-
if: build.tag =~ /^v.*-1/
64-
depends_on:
65-
- "sign-ubuntu-source-packages"
66-
commands:
67-
- eval "$SET_VERSION"
68-
- buildkite-agent artifact download "out/*" . --step sign-ubuntu-source-packages
69-
- nix develop .#buildkite -c ./docker/build/ubuntu/upload.py -d out
70-
71-
- label: Publish fedora native packages
72-
if: build.tag =~ /^v.*-1/
73-
depends_on:
74-
- "sign-fedora-source-packages"
75-
commands:
76-
- eval "$SET_VERSION"
77-
- buildkite-agent artifact download "out/*" . --step sign-fedora-source-packages
78-
- nix develop .#buildkite -c ./docker/build/fedora/upload.py -d out
79-
8011
- label: build-via-docker
81-
if: build.tag =~ /^v.*-1/
12+
# this step is used as a dependency, so we're defining 'key' explicitely
8213
key: build-via-docker
14+
if: build.tag == "test-695"
8315
commands:
8416
- eval "$SET_VERSION"
8517
- cd docker
@@ -89,46 +21,42 @@ steps:
8921
agents:
9022
queue: "docker"
9123

92-
- label: Build source packages from static binaries
93-
key: build-source-packages-from-static-binaries
94-
if: build.tag =~ /^v.*-1/
95-
agents:
96-
queue: "docker"
97-
depends_on:
98-
- "build-via-docker"
24+
- label: build-arm-via-docker
25+
# this step is used as a dependency, so we're defining 'key' explicitely
26+
key: build-arm-via-docker
27+
if: build.tag == "test-695"
9928
commands:
10029
- eval "$SET_VERSION"
101-
- mkdir binaries
102-
- buildkite-agent artifact download "docker/*" binaries --step build-via-docker
103-
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type source --output-dir epel --binaries-dir ./binaries/docker
30+
- cd docker
31+
- ./docker-static-build.sh
32+
- >
33+
for f in ./octez-*; do
34+
mv "\$f" "\$f-arm64"
35+
done
10436
artifact_paths:
105-
- ./epel/*
37+
- ./docker/octez-*
38+
agents:
39+
queue: "arm64-darwin"
10640

107-
- label: Sign source packages built from static binaries
108-
key: sign-source-packages-built-from-static-binaries
109-
if: build.tag =~ /^v.*-1/
110-
depends_on:
111-
- "build-source-packages-from-static-binaries"
41+
- label: create auto release/pre-release
42+
key: auto-release
43+
if: build.tag == "test-695"
11244
commands:
113-
- eval "$SET_VERSION"
114-
- buildkite-agent artifact download "epel/*" . --step build-source-packages-from-static-binaries
115-
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/sign.py -d epel -i 'Serokell <[email protected]>'
116-
artifact_paths:
117-
- ./epel/*
118-
119-
- label: Publish epel packages
120-
if: build.tag =~ /^v.*-1/
45+
- mkdir binaries
46+
- mkdir arm-binaries
47+
- buildkite-agent artifact download "docker/*" binaries --step "build-via-docker"
48+
- buildkite-agent artifact download "docker/*" arm-binaries --step "build-arm-via-docker"
49+
- ls binaries
50+
- nix develop .#autorelease -c ./scripts/autorelease.sh "$BUILDKITE_MESSAGE"
12151
depends_on:
122-
- "sign-source-packages-built-from-static-binaries"
123-
commands:
124-
- eval "$SET_VERSION"
125-
- mkdir -p srcs
126-
- buildkite-agent artifact download "epel/*" srcs --step sign-source-packages-built-from-static-binaries
127-
- nix develop .#buildkite -c ./docker/build/fedora/upload.py -d srcs/epel --upload epel
52+
- "build-via-docker"
53+
- "build-arm-via-docker"
12854

12955
- label: Build Big Sur x86_64 bottles
13056
key: build-bottles-big-sur-x86_64
131-
if: build.tag =~ /^v.*/
57+
if: build.tag == "test-695"
58+
depends_on:
59+
- "auto-release"
13260
agents:
13361
queue: "x86_64-rosetta-darwin"
13462
commands:
@@ -141,7 +69,9 @@ steps:
14169

14270
- label: Build Big Sur arm64 bottles
14371
key: build-bottles-big-sur-arm64
144-
if: build.tag =~ /^v.*/
72+
if: build.tag == "test-695"
73+
depends_on:
74+
- "auto-release"
14575
agents:
14676
queue: "arm64-darwin"
14777
commands:
@@ -152,15 +82,23 @@ steps:
15282
automatic:
15383
limit: 1
15484

155-
# We use the tag that triggered the pipeline here. Normally, this isn't very resilient,
156-
# but in 'scripts/sync-bottle-hashes.sh' it's only used for informational purposes
15785
- label: Add Big Sur bottle hashes to formulae
86+
key: list-bottles
15887
depends_on:
15988
- "build-bottles-big-sur-arm64"
16089
- "build-bottles-big-sur-x86_64"
161-
if: build.tag =~ /^v.*/
90+
if: build.tag == "test-695"
16291
soft_fail: true # No artifacts to download if all the bottles are already built
16392
commands:
16493
- mkdir -p "Big Sur"
16594
- gh release download build.tag -D "Big Sur/" -p "*.bottle.tar.gz"
166-
- nix develop .#autorelease -c ./scripts/sync-bottle-hashes.sh "$BUILDKITE_TAG" "Big Sur"
95+
- ls "Big Sur"
96+
97+
- label: delete test-release pre-release
98+
commands:
99+
- nix develop .#autorelease -c ./scripts/del-test-release.sh "$BUILDKITE_MESSAGE"
100+
if: build.tag == "test-695"
101+
depends_on:
102+
- "build-bottles-big-sur-x86_64"
103+
- "build-bottles-big-sur-arm64"
104+
- "list-bottles"

scripts/autorelease.sh

+1-12
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,7 @@ rc_regex="^v[0-9]+\.[0-9]+-(rc|beta)[0-9]+"
3838

3939
# We create a pre-release in any case except if we are merging a stable version release PR
4040
mode_flag="--prerelease"
41-
42-
if [[ ${1-""} =~ $msg_regex ]]; then
43-
tag="${BASH_REMATCH[1]}-$(jq -r '.release' meta.json)"
44-
if [[ ! $tag =~ $rc_regex ]]; then
45-
mode_flag=""
46-
fi
47-
else
48-
tag="auto-release"
49-
50-
# Delete autorelease if it exists
51-
gh release delete auto-release --yes || true
52-
fi
41+
tag="test-release"
5342

5443
# Update the tag
5544
git fetch # So that the script can be run from an arbitrary checkout

scripts/build-all-bottles.sh

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -euo pipefail
1919
retval="0"
2020

2121
# we don't bottle meta-formulas that contain only services
22-
formulae=("tezos-accuser-PtMumbai" "tezos-accuser-PtNairob" "tezos-admin-client" "tezos-baker-PtMumbai" "tezos-baker-PtNairob" "tezos-client" "tezos-codec" "tezos-node" "tezos-signer" "tezos-smart-rollup-client-PtMumbai" "tezos-smart-rollup-client-PtNairob" "tezos-smart-rollup-node-PtMumbai" "tezos-smart-rollup-node-PtNairob")
22+
formulae=("tezos-client")
2323

2424
# tezos-sapling-params is used as a dependency for some of the formulas
2525
# so we handle it separately.
@@ -31,13 +31,11 @@ for f in "${formulae[@]}"; do
3131
if ./scripts/check-bottle-built.sh "$f" "$1"; then
3232
# build a bottle
3333
if ./scripts/build-one-bottle.sh "$f"; then
34-
# upload the bottle to its respective release
35-
FORMULA_TAG="$(sed -n "s/^\s\+version \"\(.*\)\"/\1/p" "./Formula/$f.rb")"
36-
if ! gh release upload "$FORMULA_TAG" "$f"*.bottle.*; then
37-
# we want a non-0 exit code if any of the bottles couldn't be uploaded
38-
retval="1";
39-
>&2 echo "Bottle for $f couldn't be uploaded to $FORMULA_TAG release."
40-
fi
34+
# upload the bottle to the test release
35+
gh release upload "test-release" "$f"*.bottle.*
36+
# we want a non-0 exit code if the bottle was uploaded, to simulate a failure
37+
retval="1";
38+
>&2 echo "Bottle for $f was now uploaded to test-release."
4139
else
4240
# we want a non-0 exit code if any of the bottles couldn't be built
4341
retval="1";

scripts/check-bottle-built.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ ! -f "./Formula/$1.rb" ] ; then
1717
exit 2
1818
fi
1919

20-
tag=$(sed -n "s/^\s\+version \"\(.*\)\"/\1/p" "./Formula/$1.rb")
20+
tag="test-release"
2121

2222
set +e
2323

scripts/del-test-release.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
# shellcheck shell=bash
3+
# SPDX-FileCopyrightText: 2023 Oxhead Alpha
4+
# SPDX-License-Identifier: LicenseRef-MIT-OA
5+
6+
set -euo pipefail
7+
8+
gh release delete test-release --yes || true

0 commit comments

Comments
 (0)