Skip to content

Commit e31ed70

Browse files
committed
Test
1 parent 7fbb972 commit e31ed70

File tree

5 files changed

+30
-163
lines changed

5 files changed

+30
-163
lines changed

.buildkite/pipeline-for-tags.yml

+7-149
Original file line numberDiff line numberDiff line change
@@ -8,169 +8,27 @@ 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+
if: build.tag == "test-736"
8213
key: build-via-docker
8314
commands:
8415
- eval "$SET_VERSION"
8516
- cd docker
8617
- ./docker-static-build.sh
18+
- buildkite-agent artifact upload /tmp/binaries.txt
8719
artifact_paths:
8820
- ./docker/
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"
99-
commands:
100-
- 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
104-
artifact_paths:
105-
- ./epel/*
106-
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"
112-
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/
121-
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
128-
129-
- label: Build Big Sur x86_64 bottles
130-
key: build-bottles-big-sur-x86_64
131-
if: build.tag =~ /^v.*/
132-
agents:
133-
queue: "x86_64-rosetta-darwin"
134-
commands:
135-
- nix develop .#autorelease-macos -c ./scripts/build-all-bottles.sh "big_sur"
136-
artifact_paths:
137-
- '*.bottle.*'
138-
retry:
139-
automatic:
140-
limit: 1
141-
142-
- label: Build Big Sur arm64 bottles
143-
key: build-bottles-big-sur-arm64
144-
if: build.tag =~ /^v.*/
145-
agents:
146-
queue: "arm64-darwin"
147-
commands:
148-
- nix develop .#autorelease-macos -c ./scripts/build-all-bottles.sh "arm64_big_sur"
149-
artifact_paths:
150-
- '*.bottle.*'
151-
retry:
152-
automatic:
153-
limit: 1
154-
155-
# We use the tag that triggered the pipeline here.
156-
# However, this requires that the tag and the release name are the same, which
157-
# in practice it's always the case in this repo.
158-
- label: Add Big Sur bottle hashes to formulae
159-
key: add-bigsur-hashes
160-
depends_on:
161-
- "build-bottles-big-sur-arm64"
162-
- "build-bottles-big-sur-x86_64"
163-
if: build.tag =~ /^v.*/
164-
commands:
165-
- mkdir -p "Big Sur"
166-
- nix develop .#buildkite -c gh release download "$BUILDKITE_TAG" -D "Big Sur/" -p "*big_sur.bottle.tar.gz"
167-
- nix develop .#autorelease -c ./scripts/sync-bottle-hashes.sh "$BUILDKITE_TAG" "Big Sur"
16824

16925
- label: Update binaries list
17026
depends_on:
17127
- "build-via-docker"
172-
- "add-bigsur-hashes"
173-
if: build.tag =~ /^v.*-1/
28+
# - "add-bigsur-hashes"
29+
if: build.tag == "test-736"
17430
key: update-binaries
17531
commands:
176-
- nix develop .#buildkite /tezos-packiging/.buildkite/update-binaries.sh "$BUILDKITE_TAG" "$(buildkite-agent artifact download /docker/binaries.txt)"
32+
- buildkite-agent artifact download tmp/binaries.txt docker --step "build-via-docker"
33+
- cd docker
34+
- nix develop .#autorelease -c ./update-binaries.sh

.buildkite/retag.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git tag -d test-736
2+
git push --delete origin test-736
3+
git tag -a test-736 -m "Test"
4+
git push origin test-736

docker/docker-static-build.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ if [ -z ${OCTEZ_EXECUTABLES+x} ]; then
1616
binaries+=("octez-accuser-$proto" "octez-baker-$proto" "octez-smart-rollup-client-$proto" "octez-smart-rollup-node-$proto")
1717
done
1818

19-
printf "%s\n" "${binaries[@]}" > "binaries.txt"
20-
2119
OCTEZ_EXECUTABLES="$( IFS=$' '; echo "${binaries[*]}" )"
2220
else
2321
IFS=' ' read -r -a binaries <<< "$OCTEZ_EXECUTABLES"
@@ -54,4 +52,7 @@ container_id="$("$virtualisation_engine" create alpine-tezos)"
5452
for b in "${binaries[@]}"; do
5553
"$virtualisation_engine" cp "$container_id:/tezos/$b" "$b"
5654
done
55+
printf "%s\n" "${binaries[@]}" > "/tmp/binaries.txt"
56+
echo "${binaries[@]}"
57+
echo "$(ls /tmp | grep binaries.txt)"
5758
"$virtualisation_engine" rm -v "$container_id"

docker/package/scripts/update-binaries-list.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44

55
binaries_json_path = "/tezos-packiging/docker/test/binaries.json"
6+
binaries_list_path = "/tezos-packiging/docker/tmp/binaries.txt"
67

78
def update_binaries(binaries, field):
89
with open(binaries_json_path, 'r') as file:
@@ -14,15 +15,13 @@ def update_binaries(binaries, field):
1415

1516

1617
def main():
17-
if len(sys.argv) < 3:
18-
print("You need to provide tag and path to list of binaries argument")
19-
return
20-
tag = sys.argv[1]
21-
18+
tag = os.environ["BUILDKITE_TAG"]
19+
print(tag)
20+
print(os.environ["PWD"])
2221
binaries = []
23-
with open(sys.argv[2], 'r') as f:
22+
with open(binaries_list_path, 'r') as f:
2423
binaries = [l.strip() for l in f.readlines()]
25-
24+
print(binaries)
2625
if not binaries:
2726
raise Exception('Exception, while reading binaries list: binaries list is empty')
2827

.buildkite/update-binaries.sh renamed to docker/update-binaries.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ git config --local user.name "$bot_name"
1010
git remote remove auth-origin 2> /dev/null || :
1111
git remote add auth-origin "https://oath2:$GITHUB_PUSH_TOKEN@github.com:serokell/tezos-packaging.git"
1212
git fetch
13-
git checkout -B "$1" --track "origin/$1"
13+
git checkout -B "update-binaries-list-$BUILDKITE_TAG"
1414

15-
python3 /tezos-packiging/docker/package/scripts/update-binaries-list.py $1
15+
python3 package/scripts/update-binaries-list.py
1616

17-
git add --all
18-
git commit --fixup HEAD -m "Updated binaries for $1 release"
19-
git push auth-origin "$our_branch"
17+
# git add /tezos-packiging/docker/binaries.json
18+
# git commit --fixup HEAD -m "Updated binaries for $1 release"
19+
# git push auth-origin "$our_branch"
20+
# gh pr create -B master -t "Update list of binaries for $1"
21+
branch="$(git branch)"
22+
echo $branch
23+
diff="$(git diff)"
24+
echo $diff

0 commit comments

Comments
 (0)