Skip to content

Commit

Permalink
[TT-668] Dockerhub login
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Nov 2, 2023
1 parent ab0976f commit 166912a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
12 changes: 10 additions & 2 deletions chainlink-testing-framework/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ inputs:
aws_registries:
required: false
description: AWS registries to log into for the test if needed
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
dep_chainlink_integration_tests:
required: false
description: chainlink/integration-tests commit or branch
Expand Down Expand Up @@ -103,14 +109,16 @@ runs:
# Setup Tools and libraries
- name: Setup environment
if: inputs.run_setup == 'true'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@v2.2.13
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@v2.2.14
with:
test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }}
go_version: ${{ inputs.go_version }}
go_mod_path: ${{ inputs.go_mod_path }}
cache_restore_only: ${{ inputs.cache_restore_only }}
cache_key_id: ${{ inputs.cache_key_id }}
aws_registries: ${{ inputs.aws_registries }}
dockerhub_username: ${{ inputs.dockerhub_username }}
dockerhub_password: ${{ inputs.dockerhub_password }}
QA_AWS_REGION: ${{ inputs.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ inputs.QA_KUBECONFIG }}
Expand Down Expand Up @@ -174,7 +182,7 @@ runs:

- name: cleanup
if: always()
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@v2.0.29
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@v2.2.14
with:
triggered_by: ${{ inputs.triggered_by }}
should_cleanup: ${{ inputs.should_cleanup }}
25 changes: 19 additions & 6 deletions chainlink-testing-framework/setup-run-tests-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ inputs:
aws_registries:
required: false
description: AWS registries to log into for the test if needed
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
QA_AWS_REGION:
required: true
description: The AWS region to use
Expand All @@ -38,7 +44,7 @@ runs:
steps:
# Go setup and caching
- name: Setup Go
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@v2.2.13
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@v2.2.14
with:
test_download_vendor_packages_command: ${{ inputs.test_download_vendor_packages_command }}
go_version: ${{ inputs.go_version }}
Expand All @@ -53,28 +59,36 @@ runs:
aws-region: ${{ inputs.QA_AWS_REGION }}
role-to-assume: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600

- name: Set Kubernetes Context
if: inputs.QA_KUBECONFIG
uses: azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: ${{ inputs.QA_KUBECONFIG }}

# Login to AWS ECR registries if needed
- name: Login to Amazon ECR
if: ${{ inputs.aws_registries }}
if: inputs.aws_registries && inputs.QA_AWS_REGION
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
registries: ${{ inputs.aws_registries }}
env:
AWS_REGION: ${{ inputs.QA_AWS_REGION }}

# To avoid rate limiting from Docker Hub, we can login with a paid user account.
- name: Login to Docker Hub
if: inputs.dockerhub_username && inputs.dockerhub_password
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_password }}

# Helm Setup
- uses: smartcontractkit/tool-versions-to-env-action@v1.0.8
id: tool-versions
- uses: azure/setup-helm@v3
with:
version: v${{ steps.tool-versions.outputs.helm_version }}
version: v3.13.1
- name: Add required helm charts including chainlink-qa
shell: bash
run: |
Expand All @@ -87,6 +101,5 @@ runs:
run: |
go version
aws --version
kubectl version
helm version
helm repo list

0 comments on commit 166912a

Please sign in to comment.