Skip to content

Commit

Permalink
Fix test image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Sep 3, 2024
1 parent 47d8d35 commit 3a0b5f0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ inputs:
description: The AWS region the ECR repository is located in, should only be needed for public ECR repositories, used in configuring docker/login-action
required: true

outputs:
test_image:
description: The full name of the test image that was built
value: ${{ steps.image_outputs.outputs.test_image }}
test_image_tag:
description: The tag of the test image that was built
value: ${{ steps.image_outputs.outputs.test_image_tag }}
test_image_repository:
description: The repository of the test image that was built
value: ${{ steps.image_outputs.outputs.test_image_repo }}

runs:
using: composite
steps:
Expand Down Expand Up @@ -129,4 +140,11 @@ runs:
run: |
echo "### ${INPUTS_REPOSITORY} image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY
echo "\`${INPUTS_TAG}\`" >>$GITHUB_STEP_SUMMARY
- name: Set outputs
id: image_outputs
shell: sh
run: |
echo "test_image_repo=${{ inputs.repository }}" >> $GITHUB_OUTPUT
echo "test_image_tag=${{ inputs.tag || steps.test_runner_hash.outputs.hash_value }}" >> $GITHUB_OUTPUT
echo "test_image=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/${{ inputs.repository }}:${{ inputs.tag || steps.test_runner_hash.outputs.hash_value }}" >> $GITHUB_OUTPUT
# End Test Runner Logic
3 changes: 2 additions & 1 deletion .github/workflows/on-demand-ocr-soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
echo "### Test config override path" >> $GITHUB_STEP_SUMMARY
echo "[${{ inputs.test_config_override_path }}]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/blob/${{ github.sha }}/${{ inputs.test_config_override_path }})" >> $GITHUB_STEP_SUMMARY
- name: Build Image
id: build_test_image
uses: ./.github/actions/build-test-image
with:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
Expand All @@ -91,7 +92,7 @@ jobs:
DETACH_RUNNER: true
TEST_SUITE: soak
TEST_ARGS: -test.timeout 900h -test.memprofile memprofile.out -test.cpuprofile profile.out
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }}
ENV_JOB_IMAGE: ${{ steps.build_test_image.outputs.test_image }}
# We can comment these out when we have a stable soak test and aren't worried about resource consumption
TEST_UPLOAD_CPU_PROFILE: true
TEST_UPLOAD_MEM_PROFILE: true
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/run-e2e-tests-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Build Test Runner Image
id: build-test-runner-image
uses: ./.github/actions/build-test-image
if: ${{ inputs.with_existing_remote_runner_version == '' }}
with:
Expand All @@ -608,7 +609,9 @@ jobs:
id: set-remote-runner-version
run: |
if [[ -z "${{ inputs.with_existing_remote_runner_version }}" ]]; then
echo "remote-runner-version=${{ github.sha }}" >> $GITHUB_OUTPUT
echo "remote-runner-image=${{ steps.build-test-runner-image.outputs.test_image }}" >> $GITHUB_OUTPUT
echo "remote-runner-repository=${{ steps.build-test-runner-image.outputs.test_image_repository }}" >> $GITHUB_OUTPUT
echo "remote-runner-version=${{ steps.build-test-runner-image.outputs.test_image_tag }}" >> $GITHUB_OUTPUT
else
echo "remote-runner-version=${{ inputs.with_existing_remote_runner_version }}" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit 3a0b5f0

Please sign in to comment.