Skip to content

Commit

Permalink
updating workflow sources and migrating to testall
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa committed Sep 5, 2024
1 parent 97c8ced commit f1123bc
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 12 deletions.
56 changes: 47 additions & 9 deletions .github/workflows-source/release-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Release Testing
on:
push:
branches:
- 'hotfix-*'
- 'rc--*'
- "hotfix-*"
- "rc--*"
workflow_dispatch:

# new commits interrupt any running workflow on the same branch
Expand Down Expand Up @@ -41,6 +41,17 @@ anchors:
--privileged --cgroupns host
-v /cache:/cache -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp
timeout-minutes: 180 # 3 hours
dind-small-setup: &dind-small-setup
runs-on:
group: zh1
labels: dind-large
container:
<<: *image
options: >-
-e NODE_NAME
--privileged --cgroupns host
-v /cache:/cache -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp
timeout-minutes: 180 # 3 hours
checkout: &checkout
name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -182,10 +193,37 @@ jobs:
cd ci/src/dependencies/
$SHELL_WRAPPER python3 job/bazel_rust_ic_scanner_release_job.py
trigger-qualifier-workflow:
name: Qualify
needs: [ci-main, bazel-system-test-nightly, bazel-system-test-staging, bazel-system-test-hotfix, dependency-scan-release-cut]
uses: dfinity/dre/.github/workflows/qualify.yaml@main
secrets: inherit
with:
version: ${{ github.sha }}
setup-guest-os-qualification:
<<: *dind-small-setup
outputs:
matrix: ${{ steps.generate.outputs.output }}
steps:
- id: generate
name: Fetch beginning versions for qualification
shell: bash
run: |
sudo apt-get install -y jq curl
UNIQUE_VERSIONS=$(curl https://rollout-dashboard.ch1-rel1.dfinity.network/api/v1/rollouts | jq -r '.[] | select (.state != "failed") | select (.state != "complete") | .batches | to_entries[] | "\(.value)"' | jq '.subnets[].git_revision' | sort | uniq | jq -s )
echo "Will qualify starting from versions: ${UNIQUE_VERSIONS}"
echo "output=$(jq -cn --argjson versions "$UNIQUE_VERSIONS" '{version: $versions}')" >> $GITHUB_OUTPUT
guest-os-qualification:
name: Qualifying ${{ matrix.version }} -> ${{ github.sha }}
needs: setup-guest-os-qualification
strategy:
matrix: ${{ fromJson(needs.setup-guest-os-qualification.outputs.matrix) }}
<<: *dind-small-setup
steps:
- <<: *checkout
- name: Run qualification for version ${{ matrix.version }} from the tip of the branch
uses: ./.github/actions/bazel-test-all/
env:
AWS_SHARED_CREDENTIALS_CONTENT: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }}
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/dre:guest_os_qualification"
BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel --cache_test_results=no --test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}"
# check if PR title contains release and set timeout filters accordingly
BAZEL_EXTRA_ARGS_RULES: ${{ env.BAZEL_EXTRA_ARGS_RULES || '' }}
# run on diff only if it is a pull request, otherwise run all targets
RUN_ON_DIFF_ONLY: false
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
15 changes: 12 additions & 3 deletions .github/workflows/release-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Run qualification for version ${{ matrix.version }} from the tip of the branch
shell: bash
run: |
bazel test //rs/tests/dre:guest_os_qualification --config=systest --cache_test_results=no --test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}
uses: ./.github/actions/bazel-test-all/
env:
AWS_SHARED_CREDENTIALS_CONTENT: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }}
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/dre:guest_os_qualification"
BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel --cache_test_results=no --test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}"
# check if PR title contains release and set timeout filters accordingly
BAZEL_EXTRA_ARGS_RULES: ${{ env.BAZEL_EXTRA_ARGS_RULES || '' }}
# run on diff only if it is a pull request, otherwise run all targets
RUN_ON_DIFF_ONLY: false
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}

0 comments on commit f1123bc

Please sign in to comment.