Skip to content

Commit

Permalink
install clusterawsadm
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Oct 17, 2024
1 parent 98572ce commit eadb73d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ jobs:
# Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files
sudo sysctl fs.inotify.max_user_watches=1048576
sudo sysctl fs.inotify.max_user_instances=8192
- name: Install clusterawsadm
if: matrix.infra == 'aws'
run: |
curl -L https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.6.1/clusterawsadm-linux-amd64 -o clusterawsadm
chmod +x ./clusterawsadm
sudo mv ./clusterawsadm /usr/local/bin
clusterawsadm version
- name: Configure AWS Credentials
id: creds
if: matrix.infra == 'aws'
Expand All @@ -153,12 +160,18 @@ jobs:
- name: Set AWS Credentials as Environment Variables
if: matrix.infra == 'aws'
run: |
echo "AWS_ACCESS_KEY_ID=${{ steps.creds.outputs.aws-access-key-id }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ steps.creds.outputs.aws-secret-access-key }}" >> $GITHUB_ENV
echo "AWS_SESSION_TOKEN=${{ steps.creds.outputs.aws-session-token }}" >> $GITHUB_ENV
# For future steps
echo "AWS_ACCESS_KEY_ID=${{ steps.creds.outputs.aws-access-key-id }}" >> "$GITHUB_ENV"
echo "AWS_SECRET_ACCESS_KEY=${{ steps.creds.outputs.aws-secret-access-key }}" >> "$GITHUB_ENV"
echo "AWS_SESSION_TOKEN=${{ steps.creds.outputs.aws-session-token }}" >> "$GITHUB_ENV"
# For current step
export AWS_ACCESS_KEY_ID=${{ steps.creds.outputs.aws-access-key-id }}
export AWS_SECRET_ACCESS_KEY=${{ steps.creds.outputs.aws-secret-access-key }}
export AWS_SESSION_TOKEN=${{ steps.creds.outputs.aws-session-token }}
AWS_B64ENCODED_CREDENTIALS=$(clusterawsadm bootstrap credentials encode-as-profile --region us-east-2)
echo "AWS_B64ENCODED_CREDENTIALS=$AWS_B64ENCODED_CREDENTIALS" >> $GITHUB_ENV 2>&1
echo "AWS_B64ENCODED_CREDENTIALS=$AWS_B64ENCODED_CREDENTIALS" >> "$GITHUB_ENV"
echo "::add-mask::$AWS_B64ENCODED_CREDENTIALS"
- name: Run e2e tests
if: ${{!(matrix.infra == 'aws' && (matrix.ginkgo_focus == 'KCP remediation' || matrix.ginkgo_focus == 'MachineDeployment remediation'))}}
Expand Down

0 comments on commit eadb73d

Please sign in to comment.