From 4d4767327fc555c37be2f3eaa7eb7573e970a5f6 Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Mon, 16 Dec 2024 15:52:17 -0500 Subject: [PATCH 1/2] Manual Test Tag Creation --- .github/workflows/integration-tests-publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests-publish.yml b/.github/workflows/integration-tests-publish.yml index df07cc1e231..24273c1c9b9 100644 --- a/.github/workflows/integration-tests-publish.yml +++ b/.github/workflows/integration-tests-publish.yml @@ -8,7 +8,8 @@ on: workflow_dispatch: env: - ECR_TAG: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:develop + ECR_TAG_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests + ECR_TAG_DEFAULT: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:develop CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink jobs: @@ -28,7 +29,11 @@ jobs: id: tags if: github.event_name != 'workflow_dispatch' run: | - echo "other_tags=${ECR_TAG}" >> $GITHUB_OUTPUT + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "other_tags=${ECR_TAG_BASE}:manual-${{ github.sha }}" >> $GITHUB_ENV + else + echo "other_tags=${ECR_TAG_DEFAULT}" >> $GITHUB_ENV + fi - name: Build Image uses: smartcontractkit/.github/actions/ctf-build-test-image@6781e048ecc1aadf7d605722c32e8068a5f829ce # ctf-build-test-image@0.2.0 with: From d270d01a7204ff4abfdfd85a174e5be7b690b78e Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Mon, 16 Dec 2024 16:12:12 -0500 Subject: [PATCH 2/2] Proper prefix --- .github/actions/build-chainlink-image/action.yml | 7 +++++-- .github/workflows/integration-tests-publish.yml | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-chainlink-image/action.yml b/.github/actions/build-chainlink-image/action.yml index 0e457560bf0..074af238859 100644 --- a/.github/actions/build-chainlink-image/action.yml +++ b/.github/actions/build-chainlink-image/action.yml @@ -5,6 +5,9 @@ inputs: tag_suffix: description: The suffix to append to the image tag (usually blank or "-plugins") default: "" + tag_prefix: + description: The prefix to prepend to the image tag (usually blank) + default: "" dockerfile: description: The path to the Dockerfile to use (usually core/chainlink.Dockerfile or plugins/chainlink.Dockerfile) default: core/chainlink.Dockerfile @@ -32,7 +35,7 @@ runs: uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: chainlink - tag: ${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} + tag: ${{ inputs.tag_prefix }}${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} AWS_REGION: ${{ inputs.AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} - name: Build Image @@ -42,7 +45,7 @@ runs: cl_repo: smartcontractkit/chainlink cl_ref: ${{ inputs.git_commit_sha }} cl_dockerfile: ${{ inputs.dockerfile }} - push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} + push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ inputs.tag_prefix }}${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} QA_AWS_REGION: ${{ inputs.AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} GO_COVER_FLAG: true diff --git a/.github/workflows/integration-tests-publish.yml b/.github/workflows/integration-tests-publish.yml index 24273c1c9b9..f2c91d57677 100644 --- a/.github/workflows/integration-tests-publish.yml +++ b/.github/workflows/integration-tests-publish.yml @@ -9,7 +9,6 @@ on: env: ECR_TAG_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests - ECR_TAG_DEFAULT: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:develop CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink jobs: @@ -32,7 +31,7 @@ jobs: if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "other_tags=${ECR_TAG_BASE}:manual-${{ github.sha }}" >> $GITHUB_ENV else - echo "other_tags=${ECR_TAG_DEFAULT}" >> $GITHUB_ENV + echo "other_tags=${ECR_TAG_BASE}:develop" >> $GITHUB_ENV fi - name: Build Image uses: smartcontractkit/.github/actions/ctf-build-test-image@6781e048ecc1aadf7d605722c32e8068a5f829ce # ctf-build-test-image@0.2.0 @@ -63,10 +62,12 @@ jobs: - name: "" dockerfile: core/chainlink.Dockerfile tag-suffix: "" + tag-prefix: "manual-" # uncomment in the future if we end up needing to soak test the plugins image # - name: (plugins) # dockerfile: plugins/chainlink.Dockerfile # tag-suffix: -plugins + # tag-prefix: "manual-" name: Build Chainlink Image ${{ matrix.image.name }} runs-on: ubuntu22.04-8cores-32GB steps: @@ -77,6 +78,7 @@ jobs: - name: Build Chainlink Image uses: ./.github/actions/build-chainlink-image with: + tag_prefix: ${{ matrix.image.tag-prefix }} tag_suffix: ${{ matrix.image.tag-suffix }} dockerfile: ${{ matrix.image.dockerfile }} git_commit_sha: ${{ github.sha }}