Skip to content

Commit

Permalink
[TMP]
Browse files Browse the repository at this point in the history
  • Loading branch information
krendelhoff2 committed Nov 26, 2024
1 parent eb9e07c commit 7ebee9b
Showing 1 changed file with 23 additions and 209 deletions.
232 changes: 23 additions & 209 deletions .buildkite/pipeline-raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,223 +16,37 @@ steps:
# To avoid race-conditions for the gpg key between jobs which sometimes leads to weird errors
- wait

- label: reuse lint
command: nix shell .#reuse -c reuse lint
- label: check trailing whitespace
command: .buildkite/check-trailing-whitespace.sh
- label: crossref-verify
command: nix shell -f https://github.com/serokell/crossref-verifier/archive/68a1f9d25b6e7835fea8299b18a3e6c61dbb2a5c.tar.gz -c crossref-verify
soft_fail: true
- label: lint python code
command: nix shell .#python311Packages.black -c black --check --diff --color .
soft_fail: true
- label: lint bash scripts
command: nix shell .#shellcheck -c shellcheck --shell=bash --exclude=SC1091 -x $(find . -name '*.sh')
- label: pipeline-filtering
command: nix develop .#buildkite --command 'nix shell .#bats -c ./tests/buildkite/filter-pipeline.bats'
only_changes:
- .buildkite/filter-pipeline.py
- tests/buildkite/.*
- label: check auto-inserting bottle hashes
commands:
- cd tests/bottle-hashes/
- ./test-hash-insert.sh

- label: build via nix
commands:
# NOTE: if this changes, remember to update the instructions in the nix/README.md too
- nix build . -o binaries
branches: "!master"
- label: check flake
commands:
- nix flake check -L
branches: "!master"
# nix builds are usually cached, so we don't care about only_changes setting for it

- label: build-via-docker
# this step is used as a dependency, so we're defining 'key' explicitely
key: build-via-docker
commands:
- eval "$SET_VERSION"
- cd docker
- ./docker-static-build.sh
artifact_paths:
- ./docker/octez-*
only_changes: &static_binaries_changes_regexes
- docker/build/.*.sh
- docker/build/Dockerfile
- docker/docker-static-build.sh
- meta.json
- protocols.json

- label: build-arm-via-docker
# this step is used as a dependency, so we're defining 'key' explicitely
key: build-arm-via-docker
commands:
- eval "$SET_VERSION"
- cd docker
- ./docker-static-build.sh
- >
for f in ./octez-*; do
mv "\$f" "\$f-arm64"
done
artifact_paths:
- ./docker/octez-*
agents:
queue: "arm64-darwin"
only_changes: *static_binaries_changes_regexes

- label: test docker-built binaries
commands:
- buildkite-agent artifact download "docker/*" . --step "build-via-docker"
- chmod +x ./docker/*
- nix-build . -A binaries-test --no-out-link --arg path-to-binaries ./docker
branches: "!master"
depends_on:
- "build-via-docker"
only_changes:
- tests/tezos-binaries.nix
- tests/test_script.py
# files from nix/ are massively used in tests infrastructure
- nix/.*

- label: test deb source packages via docker
commands:
- eval "$SET_VERSION"
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source
- label: Build ubuntu source packages
key: build-ubuntu-source-packages
commands:
- eval "$SET_VERSION"
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-admin-client -d focal
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-admin-client -d noble
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-client -d focal
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-dal-node -d noble
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-dal-node -d focal
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-accuser-PsParisC -d focal
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-baker-PsQuebec -d jammy
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-baker-PsQuebec -d noble
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources -p tezos-codec -d jammy
artifact_paths:
- ./out/*
branches: "!master"
timeout_in_minutes: 60
only_changes: &ubuntu_native_packaging_changes_regexes
- docker/package/.*
- docker/build/ubuntu/build.py
- docker/build/util/build.py
- docker/baking/.*
- meta.json
- protocols.json

- label: test deb binary packages via docker
commands:
- eval "$SET_VERSION"
# Building all binary packages will take significant amount of time, so we build only one
# in order to ensure package generation sanity
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type binary -p tezos-baker-PsParisC
- rm -rf out
# It takes much time to build binary package, so we do it only on master
branches: "master"
timeout_in_minutes: 240
only_changes: *ubuntu_native_packaging_changes_regexes

- label: test rpm source packages via docker
- label: Sign ubuntu source packages
depends_on:
- "build-ubuntu-source-packages"
key: sign-ubuntu-source-packages
commands:
- eval "$SET_VERSION"
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type source
- buildkite-agent artifact download "out/*" . --step build-ubuntu-source-packages
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/sign.py -d out -i 'Serokell <[email protected]>'
artifact_paths:
- ./out/*
branches: "!master"
timeout_in_minutes: 60
only_changes: &fedora_native_packaging_changes_regexes
- docker/package/.*
- docker/build/fedora/build.py
- docker/build/util/build.py
- docker/baking/.*
- meta.json
- protocols.json

- label: test rpm binary packages via docker
commands:
- eval "$SET_VERSION"
# Building all binary packages will take significant amount of time, so we build only one
# in order to ensure package generation sanity
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type binary -p tezos-baker-PsParisC
- rm -rf out
# It takes much time to build binary package, so we do it only on master
branches: "master"
timeout_in_minutes: 180
only_changes: *fedora_native_packaging_changes_regexes

- label: build deb packages with static binaries
key: build-static-deb
- label: Publish ubuntu native packages
depends_on:
- "build-via-docker"
- "sign-ubuntu-source-packages"
commands:
- eval "$SET_VERSION"
- buildkite-agent artifact download "docker/octez-*" . --step build-via-docker
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type binary --binaries-dir docker --distributions focal
artifact_paths:
- ./out/*
only_changes: *ubuntu_native_packaging_changes_regexes

- label: test gen_systemd_service_file.py script
commands:
- eval "$SET_VERSION"
- nix develop .#autorelease -c ./gen_systemd_service_file.py tezos-node
branches: "!master"
only_changes:
- gen_systemd_service_file.py
- docker/package/.*

- label: test bundled systemd services
# Used in .buildkite/hooks/pre-exit
key: test-systemd-services
depends_on:
- "build-static-deb"
only_changes:
- :<< *ubuntu_native_packaging_changes_regexes
- tests/systemd/.*
agents:
queue: "default"
commands:
- buildkite-agent artifact download "out/*~focal_amd64.deb" . --step build-static-deb
- cd tests/systemd
- NIXPKGS_ALLOW_UNFREE=1 nix shell --impure ../..#legacyPackages.x86_64-linux.vagrant ../..#legacyPackages.x86_64-linux.curl -c vagrant --packages-directory=../../out up --provider=libvirt
retry:
automatic:
limit: 3

- label: create auto release/pre-release
key: auto-release
commands:
- mkdir binaries
- mkdir arm-binaries
- buildkite-agent artifact download "docker/*" binaries --step "build-via-docker"
- buildkite-agent artifact download "docker/*" arm-binaries --step "build-arm-via-docker"
- ls binaries
- nix develop .#autorelease -c ./scripts/autorelease.sh "$BUILDKITE_MESSAGE"
branches: master
depends_on:
- "build-via-docker"
- "build-arm-via-docker"
only_changes:
- scripts/autorelease.sh
- scripts/shell.nix
# files from 'nix/' directory are used in the autorelease script
- nix/.*
- tezos-release.nix
- release.nix

# Update mirror repositories on master if brew formulae have been updated or bottle hashes added
- label: update stable mirror repository
if: |
build.branch == "master" &&
( build.message =~ /^Merge pull request .* from serokell\/auto\/v[0-9]+\.[0-9]+-release/ ||
build.message =~ /^Merge pull request .* from serokell\/auto\/update-brew-formulae-v[.0-9]+-[0-9]+/ )
depends_on:
- "auto-release"
env:
MIRROR_REPO: "[email protected]:serokell/tezos-packaging-stable.git"
commands: &update_mirror
- git pull origin "$BUILDKITE_BRANCH:$BUILDKITE_BRANCH"
- git push --mirror "$$MIRROR_REPO"

- label: update RC mirror repository
if: |
build.branch == "master" &&
(build.message =~ /^Merge pull request .* from serokell\/auto\/v[0-9]+\.[0-9]+-(rc|beta).*-release/ ||
build.message =~ /^Merge pull request .* from serokell\/auto\/update-brew-formulae-v[.0-9]+-(rc|beta).*/)
depends_on:
- "auto-release"
env:
MIRROR_REPO: "[email protected]:serokell/tezos-packaging-rc.git"
commands: *update_mirror
- buildkite-agent artifact download "out/*" . --step sign-ubuntu-source-packages
- nix develop .#buildkite -c ./docker/build/ubuntu/upload.py -d out

0 comments on commit 7ebee9b

Please sign in to comment.