From 0a24d60a704d65194c319bd48983a475da7a050d Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 15:53:34 -0500 Subject: [PATCH 01/21] gauntlet-plus-plus startup action --- .../ctf-setup-gauntlet-plus-plus/README.md | 0 .../ctf-setup-gauntlet-plus-plus/action.yml | 52 +++++++++++++++++++ .../ctf-setup-gauntlet-plus-plus/package.json | 0 .../ctf-setup-gauntlet-plus-plus/project.json | 0 .../action.yml | 6 +++ 5 files changed, 58 insertions(+) create mode 100644 actions/ctf-setup-gauntlet-plus-plus/README.md create mode 100644 actions/ctf-setup-gauntlet-plus-plus/action.yml create mode 100644 actions/ctf-setup-gauntlet-plus-plus/package.json create mode 100644 actions/ctf-setup-gauntlet-plus-plus/project.json diff --git a/actions/ctf-setup-gauntlet-plus-plus/README.md b/actions/ctf-setup-gauntlet-plus-plus/README.md new file mode 100644 index 00000000..e69de29b diff --git a/actions/ctf-setup-gauntlet-plus-plus/action.yml b/actions/ctf-setup-gauntlet-plus-plus/action.yml new file mode 100644 index 00000000..0ca4f172 --- /dev/null +++ b/actions/ctf-setup-gauntlet-plus-plus/action.yml @@ -0,0 +1,52 @@ +name: ctf-setup-gauntlet-plus-plus +description: "Common gauntlet-plus-plus setup for CTF" + +inputs: + dockerhub_username: + description: + Username for Docker Hub to avoid rate limits when pulling public images + required: false + dockerhub_password: + description: + Password for Docker Hub to avoid rate limits when pulling public images + required: false + PROD_AWS_REGION: + required: true + description: The AWS region to use + PROD_AWS_ROLE_TO_ASSUME: + required: true + description: The AWS role to assume + gauntlet_plus_plus_image: + required: true + description: Gauntlet-plus-plus image link + aws_role_duration_seconds: + required: false + default: "3600" + description: The duration to be logged into the aws role for + aws_account_number: + required: true + description: AWS Account number that holds the gauntlet_plus_plus + +runs: + using: composite + steps: + - name: Login to Amazon ECR + if: inputs.aws_registries && inputs.PROD_AWS_REGION + id: login-ecr + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 + with: + registries: ${{ inputs.aws_account_number }} + env: + AWS_REGION: ${{ inputs.PROD_AWS_REGION }} + # Setup AWS cred and K8s context + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 + with: + aws-region: ${{ inputs.PROD_AWS_REGION }} + role-to-assume: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} + role-duration-seconds: ${{ inputs.aws_role_duration_seconds }} + mask-aws-account-id: true + - name: Pull Gauntlet Plus Plus Image + run: | + docker pull ${{ inputs.gauntlet_plus_plus_image }} + \ No newline at end of file diff --git a/actions/ctf-setup-gauntlet-plus-plus/package.json b/actions/ctf-setup-gauntlet-plus-plus/package.json new file mode 100644 index 00000000..e69de29b diff --git a/actions/ctf-setup-gauntlet-plus-plus/project.json b/actions/ctf-setup-gauntlet-plus-plus/project.json new file mode 100644 index 00000000..e69de29b diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index b541996f..490b1d79 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -61,6 +61,9 @@ inputs: required: false description: Do not use a go cache default: "false" + gauntlet-plus-plus-image: + required: false + description: Gauntlet-plus-plus image link gati_token: required: false description: Token provided by GATI to pull from private repos @@ -83,6 +86,9 @@ runs: ${{ inputs.test_download_vendor_packages_command }} gati_token: ${{ inputs.gati_token }} + # Setup Gauntlet plus plus + - name: Setup gauntlet plus plus + if: inputs. # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 From aeb6ed2bd083f03e31fd28a5bf390c2a8d47e3bb Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 16:08:30 -0500 Subject: [PATCH 02/21] Added required arguments to upstream steps --- actions/ctf-run-tests/action.yml | 16 +++++++++++++++ .../ctf-setup-gauntlet-plus-plus/project.json | 7 +++++++ .../action.yml | 20 ++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 9e148327..a95709d5 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -137,6 +137,18 @@ inputs: QA_AWS_ROLE_TO_ASSUME: required: true description: The AWS role to assume + QA_PROD_REGION: + required: false + description: The AWS region to use for prod ECR + QA_PROD_ROLE_TO_ASSUME: + required: false + description: The AWS role to assume for prod ECR + PROD_AWS_ACCOUNT_NUMBER: + required: false + description: The AWS Account number for the prod AWS account + gauntlet_plus_plus_image: + required: false + description: Gauntlet-plus-plus image link QA_KUBECONFIG: required: false description: The kubernetes configuration to use @@ -189,6 +201,10 @@ runs: QA_KUBECONFIG: ${{ inputs.QA_KUBECONFIG }} should_tidy: ${{ inputs.should_tidy }} no_cache: ${{ inputs.no_cache }} + PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} + PROD_AWS_REGION: ${{ inputs.PROD_AWS_REGION }} + gauntlet_plus_plus_image: ${{ inputs.gauntlet_plus_plus_image }} + prod_aws_account_number: ${{ inputs.PROD_AWS_ACCOUNT_NUMBER }} gati_token: ${{ inputs.gati_token }} - name: Replace chainlink/integration-tests deps diff --git a/actions/ctf-setup-gauntlet-plus-plus/project.json b/actions/ctf-setup-gauntlet-plus-plus/project.json index e69de29b..edb51f18 100644 --- a/actions/ctf-setup-gauntlet-plus-plus/project.json +++ b/actions/ctf-setup-gauntlet-plus-plus/project.json @@ -0,0 +1,7 @@ +{ + "name": "ctf-setup-gauntlet-plus-plus", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "application", + "sourceRoot": "actions/ctf-setup-gauntlet-plus-plus", + "targets": {} +} diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 490b1d79..b6b86fff 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -50,6 +50,12 @@ inputs: QA_AWS_ROLE_TO_ASSUME: required: true description: The AWS role to assume + QA_PROD_REGION: + required: false + description: The AWS region to use for prod ECR + QA_PROD_ROLE_TO_ASSUME: + required: false + description: The AWS role to assume for prod ECR QA_KUBECONFIG: required: false description: The kubernetes configuration to use @@ -64,6 +70,9 @@ inputs: gauntlet-plus-plus-image: required: false description: Gauntlet-plus-plus image link + prod_aws_account_number: + required: false + description: AWS Account number that holds the gauntlet_plus_plus gati_token: required: false description: Token provided by GATI to pull from private repos @@ -88,7 +97,16 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus - if: inputs. + if: inputs.gauntlet-plus-plus-image + uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@4e65fe3bff04025815b53ba96e20447e386420f6 # ctf-setup-gauntlet-plus-plus@0.0.1 + with: + docker_username: ${{ inputs.docker_username }} + docker_password: ${{ inputs.docker_password }} + PROD_AWS_REGION: ${{ inputs.PROD_AWS_REGION }} + PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} + gauntlet_plus_plus_image: ${{ inputs.gauntlet-plus-plus-image }} + aws_account_number: ${{ prod_aws_account_number }} + # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 From af2b162e3fbcff6da67bb509d8c7ec9b85d7b059 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 16:08:55 -0500 Subject: [PATCH 03/21] version bump --- actions/ctf-setup-run-tests-environment/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index b6b86fff..83696a56 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -98,7 +98,7 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus if: inputs.gauntlet-plus-plus-image - uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@4e65fe3bff04025815b53ba96e20447e386420f6 # ctf-setup-gauntlet-plus-plus@0.0.1 + uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@d22636b73d294dfbe828f720efe27348c35d080f # ctf-setup-gauntlet-plus-plus@0.0.1 with: docker_username: ${{ inputs.docker_username }} docker_password: ${{ inputs.docker_password }} @@ -106,7 +106,7 @@ runs: PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} gauntlet_plus_plus_image: ${{ inputs.gauntlet-plus-plus-image }} aws_account_number: ${{ prod_aws_account_number }} - + # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 From c2306020bcfe617c014ea290857ccd30adc9fabe Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:13:53 -0500 Subject: [PATCH 04/21] changed naming for inputs --- actions/ctf-setup-run-tests-environment/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 83696a56..36579130 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -50,10 +50,10 @@ inputs: QA_AWS_ROLE_TO_ASSUME: required: true description: The AWS role to assume - QA_PROD_REGION: + PROD_REGION: required: false description: The AWS region to use for prod ECR - QA_PROD_ROLE_TO_ASSUME: + PROD_AWS_ROLE_TO_ASSUME: required: false description: The AWS role to assume for prod ECR QA_KUBECONFIG: @@ -105,7 +105,7 @@ runs: PROD_AWS_REGION: ${{ inputs.PROD_AWS_REGION }} PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} gauntlet_plus_plus_image: ${{ inputs.gauntlet-plus-plus-image }} - aws_account_number: ${{ prod_aws_account_number }} + aws_account_number: ${{ inputs.prod_aws_account_number }} # Setup AWS cred and K8s context - name: Configure AWS Credentials From 6aeeeddbbd6d98d953b8ab7e38649448973c6be3 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:14:39 -0500 Subject: [PATCH 05/21] Version bump and input naming --- actions/ctf-run-tests/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index a95709d5..610d733e 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -137,10 +137,10 @@ inputs: QA_AWS_ROLE_TO_ASSUME: required: true description: The AWS role to assume - QA_PROD_REGION: + PROD_AWS_REGION: required: false description: The AWS region to use for prod ECR - QA_PROD_ROLE_TO_ASSUME: + PROD_AWS_ROLE_TO_ASSUME: required: false description: The AWS role to assume for prod ECR PROD_AWS_ACCOUNT_NUMBER: @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@2c41e20994aa9c0ae1af1ab467c64ac4acb15f2d # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@6108e14f4e03b1567dac59ca78120d9d167f3b53 # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From c5420f0c8a0386c0ce7af20c09381384fb5fa1ca Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:31:51 -0500 Subject: [PATCH 06/21] added shell --- actions/ctf-setup-gauntlet-plus-plus/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/ctf-setup-gauntlet-plus-plus/action.yml b/actions/ctf-setup-gauntlet-plus-plus/action.yml index 0ca4f172..412bd84f 100644 --- a/actions/ctf-setup-gauntlet-plus-plus/action.yml +++ b/actions/ctf-setup-gauntlet-plus-plus/action.yml @@ -47,6 +47,7 @@ runs: role-duration-seconds: ${{ inputs.aws_role_duration_seconds }} mask-aws-account-id: true - name: Pull Gauntlet Plus Plus Image + shell: bash # Specify the shell to be used run: | docker pull ${{ inputs.gauntlet_plus_plus_image }} \ No newline at end of file From e11d5995e467e23776c3a5ab542b000b5b11b7f6 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:32:20 -0500 Subject: [PATCH 07/21] bump --- actions/ctf-setup-run-tests-environment/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 36579130..43f9f8e4 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -98,7 +98,7 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus if: inputs.gauntlet-plus-plus-image - uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@d22636b73d294dfbe828f720efe27348c35d080f # ctf-setup-gauntlet-plus-plus@0.0.1 + uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@766e45ddea246a5375350b3b270545e9dd186dc5 # ctf-setup-gauntlet-plus-plus@0.0.1 with: docker_username: ${{ inputs.docker_username }} docker_password: ${{ inputs.docker_password }} From cd2ee122c4175d1ca2cd8e916a8919975f33350d Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:33:02 -0500 Subject: [PATCH 08/21] bump --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 610d733e..945a0995 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@6108e14f4e03b1567dac59ca78120d9d167f3b53 # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@540ca25cc965449220180c96df6350c344f6c2d6 # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From 1b9e7c993b1fd64a65485ff32c4ade44f6fdfc51 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:49:05 -0500 Subject: [PATCH 09/21] fixed typos in input --- actions/ctf-setup-run-tests-environment/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 43f9f8e4..76468150 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -50,7 +50,7 @@ inputs: QA_AWS_ROLE_TO_ASSUME: required: true description: The AWS role to assume - PROD_REGION: + PROD_AWS_REGION: required: false description: The AWS region to use for prod ECR PROD_AWS_ROLE_TO_ASSUME: @@ -67,7 +67,7 @@ inputs: required: false description: Do not use a go cache default: "false" - gauntlet-plus-plus-image: + gauntlet_plus_plus_image: required: false description: Gauntlet-plus-plus image link prod_aws_account_number: @@ -104,7 +104,7 @@ runs: docker_password: ${{ inputs.docker_password }} PROD_AWS_REGION: ${{ inputs.PROD_AWS_REGION }} PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} - gauntlet_plus_plus_image: ${{ inputs.gauntlet-plus-plus-image }} + gauntlet_plus_plus_image: ${{ inputs.gauntlet_plus_plus_image }} aws_account_number: ${{ inputs.prod_aws_account_number }} # Setup AWS cred and K8s context From b140c2c450944873618fe59390c03726d8dbf99b Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Wed, 20 Nov 2024 23:49:21 -0500 Subject: [PATCH 10/21] bump --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 945a0995..90d14ed0 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@540ca25cc965449220180c96df6350c344f6c2d6 # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@f1517ccb75e9192bcae9689b19606e16f85d0cfe # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From b238ad45b8197cd7a4ea38bff1f0c3fad646489f Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 15:51:13 -0500 Subject: [PATCH 11/21] bump gpp action --- actions/ctf-setup-run-tests-environment/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 76468150..a7e0a79e 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -98,7 +98,7 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus if: inputs.gauntlet-plus-plus-image - uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@766e45ddea246a5375350b3b270545e9dd186dc5 # ctf-setup-gauntlet-plus-plus@0.0.1 + uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@c5420f0c8a0386c0ce7af20c09381384fb5fa1ca # ctf-setup-gauntlet-plus-plus@0.0.1 with: docker_username: ${{ inputs.docker_username }} docker_password: ${{ inputs.docker_password }} From 6ae9e5f0f6cfb214ceb22c24de99075f67b94859 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 15:51:43 -0500 Subject: [PATCH 12/21] bump setup test env --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 90d14ed0..eae0f2bf 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@f1517ccb75e9192bcae9689b19606e16f85d0cfe # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@b238ad45b8197cd7a4ea38bff1f0c3fad646489f # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From df5058e120d1113b03e03c45c9845c5ceb762074 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 17:05:48 -0500 Subject: [PATCH 13/21] Fixed underscore hyphen issue --- actions/ctf-setup-run-tests-environment/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index a7e0a79e..4479d853 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -97,7 +97,7 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus - if: inputs.gauntlet-plus-plus-image + if: inputs.gauntlet_plus_plus_image uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@c5420f0c8a0386c0ce7af20c09381384fb5fa1ca # ctf-setup-gauntlet-plus-plus@0.0.1 with: docker_username: ${{ inputs.docker_username }} From ce4d9a50f7f5b8363f28c97c26aa9f9baa9b6b2f Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 17:06:19 -0500 Subject: [PATCH 14/21] Bumped version of setup-env --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index eae0f2bf..7c3035f6 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@b238ad45b8197cd7a4ea38bff1f0c3fad646489f # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@df5058e120d1113b03e03c45c9845c5ceb762074 # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From d4931fff2d0c0b97470136ad414e6a1823cf5535 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 17:27:10 -0500 Subject: [PATCH 15/21] typo fix in docker --- actions/ctf-setup-run-tests-environment/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 4479d853..5a498829 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -100,8 +100,8 @@ runs: if: inputs.gauntlet_plus_plus_image uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@c5420f0c8a0386c0ce7af20c09381384fb5fa1ca # ctf-setup-gauntlet-plus-plus@0.0.1 with: - docker_username: ${{ inputs.docker_username }} - docker_password: ${{ inputs.docker_password }} + dockerhub_username: ${{ inputs.docker_username }} + dockerhub_password: ${{ inputs.docker_password }} PROD_AWS_REGION: ${{ inputs.PROD_AWS_REGION }} PROD_AWS_ROLE_TO_ASSUME: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} gauntlet_plus_plus_image: ${{ inputs.gauntlet_plus_plus_image }} From 1b944d8f6aaa2c69755b6165fd4427af43271804 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Thu, 21 Nov 2024 17:27:38 -0500 Subject: [PATCH 16/21] bump run env setup --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 7c3035f6..68b367cb 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@df5058e120d1113b03e03c45c9845c5ceb762074 # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@d4931fff2d0c0b97470136ad414e6a1823cf5535 # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From 11b8e8eda31ec2711f0b9f4ee71547c6b740d2ff Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Fri, 22 Nov 2024 14:30:26 -0500 Subject: [PATCH 17/21] Changed order --- .../ctf-setup-gauntlet-plus-plus/action.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/actions/ctf-setup-gauntlet-plus-plus/action.yml b/actions/ctf-setup-gauntlet-plus-plus/action.yml index 412bd84f..d23406be 100644 --- a/actions/ctf-setup-gauntlet-plus-plus/action.yml +++ b/actions/ctf-setup-gauntlet-plus-plus/action.yml @@ -30,15 +30,7 @@ inputs: runs: using: composite steps: - - name: Login to Amazon ECR - if: inputs.aws_registries && inputs.PROD_AWS_REGION - id: login-ecr - uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 - with: - registries: ${{ inputs.aws_account_number }} - env: - AWS_REGION: ${{ inputs.PROD_AWS_REGION }} - # Setup AWS cred and K8s context + # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 with: @@ -46,6 +38,14 @@ runs: role-to-assume: ${{ inputs.PROD_AWS_ROLE_TO_ASSUME }} role-duration-seconds: ${{ inputs.aws_role_duration_seconds }} mask-aws-account-id: true + - name: Login to Amazon ECR + if: inputs.aws_account_number && inputs.PROD_AWS_REGION + id: login-ecr + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 + with: + registries: ${{ inputs.aws_account_number }} + env: + AWS_REGION: ${{ inputs.PROD_AWS_REGION }} - name: Pull Gauntlet Plus Plus Image shell: bash # Specify the shell to be used run: | From 7eb75e8cf85f9d6237080b62668114cc00aaecfc Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Fri, 22 Nov 2024 14:30:54 -0500 Subject: [PATCH 18/21] bump --- actions/ctf-setup-run-tests-environment/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 5a498829..98c06ec7 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -98,7 +98,7 @@ runs: # Setup Gauntlet plus plus - name: Setup gauntlet plus plus if: inputs.gauntlet_plus_plus_image - uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@c5420f0c8a0386c0ce7af20c09381384fb5fa1ca # ctf-setup-gauntlet-plus-plus@0.0.1 + uses: smartcontractkit/.github/actions/ctf-setup-gauntlet-plus-plus@11b8e8eda31ec2711f0b9f4ee71547c6b740d2ff # ctf-setup-gauntlet-plus-plus@0.0.1 with: dockerhub_username: ${{ inputs.docker_username }} dockerhub_password: ${{ inputs.docker_password }} @@ -107,6 +107,7 @@ runs: gauntlet_plus_plus_image: ${{ inputs.gauntlet_plus_plus_image }} aws_account_number: ${{ inputs.prod_aws_account_number }} + # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 From 4229fea727f6eb36b4559c6eefbbf9f3825fa677 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Fri, 22 Nov 2024 14:31:11 -0500 Subject: [PATCH 19/21] Bump --- actions/ctf-run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/ctf-run-tests/action.yml b/actions/ctf-run-tests/action.yml index 68b367cb..b7393335 100644 --- a/actions/ctf-run-tests/action.yml +++ b/actions/ctf-run-tests/action.yml @@ -184,7 +184,7 @@ runs: # Setup Tools and libraries - name: Setup environment if: inputs.run_setup == 'true' - uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@d4931fff2d0c0b97470136ad414e6a1823cf5535 # ctf-setup-run-tests-environment@0.0.0 + uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@7eb75e8cf85f9d6237080b62668114cc00aaecfc # ctf-setup-run-tests-environment@0.0.0 with: test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }} From 34142c22fa62aafa412845d80507713e11629711 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Fri, 22 Nov 2024 17:06:10 -0500 Subject: [PATCH 20/21] prettier changes --- actions/ctf-setup-gauntlet-plus-plus/action.yml | 7 +++---- actions/ctf-setup-gauntlet-plus-plus/package.json | 11 +++++++++++ actions/ctf-setup-run-tests-environment/action.yml | 3 +-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/actions/ctf-setup-gauntlet-plus-plus/action.yml b/actions/ctf-setup-gauntlet-plus-plus/action.yml index d23406be..00c17f8e 100644 --- a/actions/ctf-setup-gauntlet-plus-plus/action.yml +++ b/actions/ctf-setup-gauntlet-plus-plus/action.yml @@ -25,12 +25,12 @@ inputs: description: The duration to be logged into the aws role for aws_account_number: required: true - description: AWS Account number that holds the gauntlet_plus_plus + description: AWS Account number that holds the gauntlet_plus_plus runs: using: composite steps: - # Setup AWS cred and K8s context + # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 with: @@ -47,7 +47,6 @@ runs: env: AWS_REGION: ${{ inputs.PROD_AWS_REGION }} - name: Pull Gauntlet Plus Plus Image - shell: bash # Specify the shell to be used + shell: bash # Specify the shell to be used run: | docker pull ${{ inputs.gauntlet_plus_plus_image }} - \ No newline at end of file diff --git a/actions/ctf-setup-gauntlet-plus-plus/package.json b/actions/ctf-setup-gauntlet-plus-plus/package.json index e69de29b..afb55cb1 100644 --- a/actions/ctf-setup-gauntlet-plus-plus/package.json +++ b/actions/ctf-setup-gauntlet-plus-plus/package.json @@ -0,0 +1,11 @@ +{ + "name": "ctf-setup-gauntlet-plus-plus", + "version": "0.1.1", + "description": "Action that pulls the gauntlet-plus-plus image", + "private": true, + "scripts": {}, + "author": "@smartcontractkit", + "license": "MIT", + "dependencies": {}, + "repository": "https://github.com/smartcontractkit/.github" +} diff --git a/actions/ctf-setup-run-tests-environment/action.yml b/actions/ctf-setup-run-tests-environment/action.yml index 98c06ec7..7833b3ec 100644 --- a/actions/ctf-setup-run-tests-environment/action.yml +++ b/actions/ctf-setup-run-tests-environment/action.yml @@ -72,7 +72,7 @@ inputs: description: Gauntlet-plus-plus image link prod_aws_account_number: required: false - description: AWS Account number that holds the gauntlet_plus_plus + description: AWS Account number that holds the gauntlet_plus_plus gati_token: required: false description: Token provided by GATI to pull from private repos @@ -107,7 +107,6 @@ runs: gauntlet_plus_plus_image: ${{ inputs.gauntlet_plus_plus_image }} aws_account_number: ${{ inputs.prod_aws_account_number }} - # Setup AWS cred and K8s context - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 From 0a19e5cc68573135fa2ffdd744842c9f22a25ff0 Mon Sep 17 00:00:00 2001 From: chray-zhang Date: Tue, 26 Nov 2024 17:52:19 -0500 Subject: [PATCH 21/21] Adding Changeset --- .changeset/fluffy-trainers-visit.md | 7 +++++++ pnpm-lock.yaml | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/fluffy-trainers-visit.md diff --git a/.changeset/fluffy-trainers-visit.md b/.changeset/fluffy-trainers-visit.md new file mode 100644 index 00000000..83f86d4d --- /dev/null +++ b/.changeset/fluffy-trainers-visit.md @@ -0,0 +1,7 @@ +--- +"ctf-setup-gauntlet-plus-plus": major +"ctf-setup-run-tests-environment": minor +"ctf-run-tests": minor +--- + +Adding support to include pulling the gauntlet-plus-plus image from the prod ECR diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a2eac4e..8422ce29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -153,6 +153,8 @@ importers: actions/ctf-run-tests-binary: {} + actions/ctf-setup-gauntlet-plus-plus: {} + actions/ctf-setup-go: {} actions/ctf-setup-run-tests-environment: {}