Skip to content

Commit

Permalink
Update automation on demand workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Aug 22, 2024
1 parent 35f68c8 commit ab2f152
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 30 deletions.
11 changes: 11 additions & 0 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,17 @@ runner-test-matrix:
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_2 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_3
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: docker
test_env_vars:
TEST_SUITE: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_3 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: chaos/automation_chaos_test.go
path: integration-tests/chaos/automation_chaos_test.go
test_env_type: k8s-remote-runner
Expand Down
67 changes: 37 additions & 30 deletions .github/workflows/run-automation-ondemand-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ jobs:
shell: bash
run: |
if [[ "${{ inputs.chainlinkImage }}" == "QA_ECR" ]]; then
echo "image='{{ env.QA_CHAINLINK_IMAGE }}'" >>$GITHUB_OUTPUT
echo "image='{{ env.QA_CHAINLINK_IMAGE }}'" >> $GITHUB_ENV
else
echo "image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT
echo "image=${{ inputs.chainlinkImage }}" >> $GITHUB_ENV
fi
if [[ "${{ inputs.chainlinkImageUpdate }}" == "QA_ECR" ]]; then
echo "upgrade_image='{{ env.QA_CHAINLINK_IMAGE }}'" >>$GITHUB_OUTPUT
echo "upgrade_image='{{ env.QA_CHAINLINK_IMAGE }}'" >> $GITHUB_ENV
else
echo "upgrade_image=${{ inputs.chainlinkImageUpdate }}" >>$GITHUB_OUTPUT
echo "upgrade_image=${{ inputs.chainlinkImageUpdate }}" >> $GITHUB_ENV
fi
if [[ -z "${{ inputs.chainlinkVersion }}" ]] && [[ "${{ inputs.chainlinkImage }}" == "QA_ECR" ]]; then
echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT
echo "version=${{ github.sha }}" >> $GITHUB_ENV
else
echo "version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT
echo "version=${{ inputs.chainlinkVersion }}" >> $GITHUB_ENV
fi
if [[ -z "${{ inputs.chainlinkVersionUpdate }}" ]] && [[ "${{ inputs.chainlinkImageUpdate }}" == "QA_ECR" ]]; then
echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ github.sha }}" >> $GITHUB_ENV
else
echo "upgrade_version=${{ inputs.chainlinkVersionUpdate }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ inputs.chainlinkVersionUpdate }}" >> $GITHUB_ENV
fi
- name: Check if chainlink image check required
id: determine-chainlink-image-check
shell: bash
run: |
chainlink_image_versions=""
if [ "${{ github.event.inputs.chainlinkImage }}" = "QA_ECR" ]; then
chainlink_image_versions+="${{ steps.determine-build.outputs.version }},"
chainlink_image_versions+="${{ env.version }},"
fi
if [ "${{ github.event.inputs.chainlinkImageUpdate }}" = "QA_ECR" ]; then
chainlink_image_versions+="${{ steps.determine-build.outputs.upgrade_version }}"
chainlink_image_versions+="${{ env.upgrade_version }}"
fi
echo "require_chainlink_image_versions_in_qa_ecr=$chainlink_image_versions" >> $GITHUB_OUTPUT
- name: Set tests to run
Expand All @@ -93,41 +93,48 @@ jobs:
cat > test_list.yaml <<EOF
- id: smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_0
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ env.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ env.upgrade_version }}
- id: smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_1
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ env.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ env.upgrade_version }}
- id: smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_2
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: ${{ env.upgrade_image }}
E2E_TEST_CHAINLINK_UPGRADE_VERSION: ${{ env.upgrade_version }}
EOF
# Run reorg tests if enabled
if [[ "${{ github.event.inputs.enableReorg }}" == 'true' ]]; then
cat >> test_list.yaml <<EOF
- id: reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_0
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
- id: reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_1
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
- id: reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_2
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
- id: reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_3
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
EOF
fi
Expand All @@ -136,8 +143,8 @@ jobs:
cat >> test_list.yaml <<EOF
- id: chaos/automation_chaos_test.go
test_env_vars:
E2E_TEST_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ steps.determine-build.outputs.version }}
E2E_TEST_CHAINLINK_IMAGE: ${{ env.image }}
E2E_TEST_CHAINLINK_VERSION: ${{ env.version }}
EOF
fi
Expand Down

0 comments on commit ab2f152

Please sign in to comment.