-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TT-257 Use checks for existing images for shas before building (#8976)
* TT-257 Use checks for existing images for shas before building * Fix some patterns * fix action to use inputs instead of input * Point tags to correct location * Fix solana image build test * bump solana action versions * helm repo update for solana * Switch to having solana test image build in a different step. * Review comments
- Loading branch information
Showing
6 changed files
with
191 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build Test Image | ||
description: A composite action that allows building and publishing the test remote runner image | ||
|
||
inputs: | ||
repository: | ||
description: The docker repository for the image | ||
default: chainlink-tests | ||
required: false | ||
tag: | ||
description: The tag to use by default and to use for checking image existance | ||
default: ${{ github.sha }} | ||
required: false | ||
other_tags: | ||
description: Other tags to push if needed | ||
required: false | ||
suites: | ||
description: The test suites to build into the image | ||
default: chaos migration performance reorg smoke soak benchmark | ||
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 | ||
QA_AWS_REGION: | ||
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 | ||
QA_AWS_ACCOUNT_NUMBER: | ||
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 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Check if image exists | ||
id: check-image | ||
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@ab595504ae9cf10c60eb8d2c5ce025284e58b210 #v2.1.5 | ||
with: | ||
repository: ${{ inputs.repository }} | ||
tag: ${{ inputs.tag }} | ||
AWS_REGION: ${{ inputs.QA_AWS_REGION }} | ||
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }} | ||
- name: Build and Publish Test Runner | ||
if: steps.check-image.outputs.exists == 'false' | ||
uses: smartcontractkit/chainlink-github-actions/docker/build-push@ab595504ae9cf10c60eb8d2c5ce025284e58b210 #v2.1.5 | ||
with: | ||
tags: | | ||
${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/${{ inputs.repository }}:${{ inputs.tag }} | ||
${{ inputs.other_tags }} | ||
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=v0.3.29 | ||
SUITES="${{ inputs.suites }}" | ||
AWS_REGION: ${{ inputs.QA_AWS_REGION }} | ||
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }} | ||
- name: Print Image Built | ||
shell: sh | ||
env: | ||
INPUTS_REPOSITORY: ${{ inputs.repository }} | ||
INPUTS_TAG: ${{ inputs.tag }} | ||
run: | | ||
echo "### ${INPUTS_REPOSITORY} image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY | ||
echo "\`${INPUTS_TAG}\`" >>$GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.