Skip to content

Commit

Permalink
AWS Native: Add AWS credentials before Test Provider Library step (#1239
Browse files Browse the repository at this point in the history
)

In pulumi/pulumi-aws-native#1919 I want to run
an actual end-2-end test with `pulumitest` in AWS Native, which requires
AWS credentials. In understand that a larger consolidation may be coming
with #1101, but this change
would allow me to land my test ahead of that. Please let me know if
there is a better way of achieving the same outcome.
  • Loading branch information
mikhailshilkov authored Dec 20, 2024
1 parent b405e5a commit 720a1a8
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ jobs:
with:
name: pulumi-${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Test Provider Library
run: make test_provider
- name: Upload coverage reports to Codecov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ jobs:
with:
name: pulumi-${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Test Provider Library
run: make test_provider
- name: Upload coverage reports to Codecov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ jobs:
with:
name: pulumi-${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Test Provider Library
run: make test_provider
- name: Upload coverage reports to Codecov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ jobs:
with:
name: pulumi-${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Test Provider Library
run: make test_provider
- name: Upload coverage reports to Codecov
Expand Down
1 change: 1 addition & 0 deletions native-provider-ci/src/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export class PrerequisitesJob implements NormalJob {
steps.Porcelain(),
steps.TarProviderBinaries(opts.hasGenBinary),
steps.UploadProviderBinaries(),
steps.ConfigureAwsCredentialsForTests(opts.provider == "aws-native"),
steps.TestProviderLibrary(),
steps.Codecov(),
steps.NotifySlack("Failure in building provider prerequisites"),
Expand Down

0 comments on commit 720a1a8

Please sign in to comment.