Skip to content

Commit

Permalink
[TT-707] chainlink-tests image build workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Nov 14, 2023
1 parent 039ffa9 commit 0d522eb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
description: The test suites to build into the image
default: chaos migration performance reorg smoke soak benchmark
required: false
base_image_tag:
description: The test base image version to use, if not provided it will use the version from the ./integration-tests/go.mod file
required: false
QA_AWS_ROLE_TO_ASSUME:
description: The AWS role to assume as the CD user, if any. Used in configuring the docker/login-action
required: true
Expand All @@ -31,6 +34,7 @@ runs:
using: composite
steps:
- name: Get CTF Version
if: ${{ inputs.base_image_tag == '' }}
id: version
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
with:
Expand All @@ -55,7 +59,7 @@ runs:
file: ./integration-tests/test.Dockerfile
build-args: |
BASE_IMAGE=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
IMAGE_VERSION=${{ steps.version.outputs.version }}
IMAGE_VERSION=${{ inputs.base_image_tag || steps.version.outputs.version }}
SUITES="${{ inputs.suites }}"
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ on:
push:
branches:
- develop
workflow_dispatch:
inputs:
chainlink-tests-tag:
description: 'The tag to be pushed'
required: true
ctf-base-image-tag:
description: |
'The tag of the CTF base image to be used,
typically something like v1.18.6 from https://github.com/smartcontractkit/chainlink-testing-framework/releases
or a custom tag or branch you have pushed.'
required: true

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

jobs:
publish-integration-test-image:
Expand All @@ -16,7 +27,7 @@ jobs:
id-token: write
contents: read
name: Publish Integration Test Image
runs-on: ubuntu-latest
runs-on: ubuntu20.04-16cores-64GB
steps:
- name: Collect Metrics
id: collect-gha-metrics
Expand All @@ -29,11 +40,12 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Build Image
uses: ./.github/actions/build-test-image
with:
other_tags: ${{ env.ECR_TAG }}
other_tags: "${{ env.ECR_TAG_BASE }}:${{ inputs.chainlink-tests-tag || 'develop' }}"
base_image_tag: ${{ inputs.ctf-base-image-tag }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
Expand Down

0 comments on commit 0d522eb

Please sign in to comment.