Skip to content

Commit

Permalink
init ocp test
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi committed May 14, 2024
1 parent 5c297e4 commit af34269
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/actions/rosa-create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
aws-secret-access-key:
description: 'AWS Secret Access Key'
required: true
aws-profile:
description: 'AWS profile to use'
required: false
rh-token:
description: 'Red Hat Hybrid Cloud Console Token'
required: true
Expand Down Expand Up @@ -67,13 +70,6 @@ runs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}

- name: Install ROSA CLI
shell: bash
run: |
Expand Down Expand Up @@ -113,10 +109,6 @@ runs:
run: |
aws s3api create-bucket --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --create-bucket-configuration LocationConstraint=${{ inputs.aws-region }}
aws s3api put-bucket-policy --bucket ${{ inputs.s3-backend-bucket }} --policy file://bucket-policy.json
env:
AWS_ACCESS_KEY_ID: ${{ inputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }}
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
- name: Terraform Init
shell: bash
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests-ocp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
secret/data/products/infrastructure-experience/ci/common AWS_SECRET_KEY;
secret/data/products/infrastructure-experience/ci/common RH_OPENSHIFT_TOKEN;
# Official action does not support profiles
- name: Add profile credentials to ~/.aws/credentials
run: |
aws configure set aws_access_key_id ${{ steps.secrets.outputs.AWS_ACCESS_KEY }} --profile ${{ env.AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ steps.secrets.outputs.AWS_SECRET_KEY }} --profile ${{ env.AWS_PROFILE }}
aws configure set region ${{ env.AWS_REGION }} --profile ${{ env.AWS_PROFILE }}
- name: Launch test
timeout-minutes: 125
uses: ./.github/actions/rosa-create-cluster
Expand Down

0 comments on commit af34269

Please sign in to comment.