Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-3368] Move E2E tests in main pipeline #4663

Merged
merged 18 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add triggering to release pipeline
  • Loading branch information
Github Action authored and paolino committed Jul 5, 2024
commit dc60d6b6562fc2e45cec41a06ad19118b0a948eb
32 changes: 22 additions & 10 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ steps:
system: ${linux}

- block: "Cabal release"
if: '(build.branch !~ /^gh-readonly-queue\/master/) && (build.branch != "master") && (build.branch !~ /^release-candidate/)'
if: |
build.branch !~ /^gh-readonly-queue\/master/
&& build.branch != "master"
&& build.env("RELEASE_CANDIDATE") == null
depends_on: linux-nix
key: cabal-release-block

Expand All @@ -50,7 +53,7 @@ steps:
key: linux-package
depends_on:
- linux-nix
command: nix build -o result/linux .#ci.artifacts.linux64.release
command: ./scripts/buildkite/main/linux-package.sh
artifact_paths: [ "./result/linux/**" ]
agents:
system: ${linux}
Expand Down Expand Up @@ -120,7 +123,7 @@ steps:
system: ${linux}

- block: "Run ruby E2E tests"
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
depends_on: linux-nix
key: trigger-e2e-tests

Expand Down Expand Up @@ -195,7 +198,7 @@ steps:
steps:

- block: 'Run benchmarks'
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
depends_on: linux-nix
key: trigger-benchmarks

Expand Down Expand Up @@ -265,7 +268,7 @@ steps:
concurrency_group: 'concurrent-benchmarks'

- block: "Restoration benchmark"
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
depends_on: linux-nix
key: restore-block

Expand Down Expand Up @@ -295,7 +298,7 @@ steps:
if: |
build.branch !~ /^gh-readonly-queue\/master/
&& build.branch != "master"
&& build.branch !~ /^release-candidate/
&& build.env("RELEASE_CANDIDATE") == null
depends_on: macos-nix
key: block-macos

Expand Down Expand Up @@ -342,7 +345,7 @@ steps:
steps:

- block: "MacOS integration tests"
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
depends_on: macos-nix
key: macos-integration-tests-block

Expand All @@ -357,7 +360,7 @@ steps:
concurrency_group: 'macos-integration-tests'

- block: "MacOS E2E tests"
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
depends_on: macos-nix
key: macos-e2e-tests-block

Expand Down Expand Up @@ -385,7 +388,7 @@ steps:
if: |
build.branch !~ /^gh-readonly-queue\/master/
&& build.branch != "master"
&& build.branch !~ /^release-candidate/
&& build.env("RELEASE_CANDIDATE") == null
depends_on: linux-nix
key: trigger-build-windows-artifacts

Expand All @@ -409,10 +412,19 @@ steps:
agents:
system: ${linux}

- label: Tag this release candidate
if: build.env("RELEASE_CANDIDATE") == null
depends_on:
- windows-package
- windows-testing-bundle
command: scripts/buildkite/main/tag-release-candidate.sh
agents:
system: ${linux}

- wait: ~

- block: "Push docker image"
if: build.branch !~ /^release-candidate/
if: build.env("RELEASE_CANDIDATE") == null
key: docker-push-block

- label: 'Push Docker Image'
Expand Down
5 changes: 5 additions & 0 deletions .buildkite/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ steps:
./scripts/buildkite/release/release-candidate.sh
agents:
system: x86_64-linux

- label: "Generate and upload trigger step to main pipeline"
depends_on: add-release-commits
commands:
- ./scripts/buildkite/release/generate-trigger.sh | buildkite-agent pipeline upload
2 changes: 1 addition & 1 deletion scripts/buildkite/main/linux-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -euox pipefail

RELEASE_CANDIDATE_COMMIT=$(buildkite-agent meta-data get "release-candidate-commit")
RELEASE_CANDIDATE_COMMIT=$(buildkite-agent meta-data get "release-candidate-commit" --default="${BUILDKITE_COMMIT}")

git fetch --all
git checkout "$RELEASE_CANDIDATE_COMMIT"
Expand Down
27 changes: 27 additions & 0 deletions scripts/buildkite/release/generate-trigger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -euo pipefail

COMMIT=$(buildkite-agent meta-data get "release-candidate-commit")
VERSION=$(buildkite-agent meta-data get "release-version")
BRANCH=$(buildkite-agent meta-data get "release-candidate-branch")
CABAL=$(buildkite-agent meta-data get "release-cabal-version")

cat << YAML
steps:
- trigger: cardano-wallet
depends_on: add-release-commits
label: Trigger the main pipeline
build:
commit: $COMMIT
branch: $BRANCH
message: Release Candidate of $VERSION
env:
RELEASE_CANDIDATE: "$VERSION"
meta_data:
release-version: "$VERSION"
release-candidate-commit: "$COMMIT"
release-candidate-branch: "$BRANCH"
release-cabal-version: "$CABAL"

YAML