-
Notifications
You must be signed in to change notification settings - Fork 0
Test stack, e2e workflow, and new commands for pulumi.yml #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: E2E Test | ||
| run-name: 'e2e: test-${{ github.run_id }}' | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: write | ||
| actions: read | ||
|
|
||
| jobs: | ||
| init: | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: init | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets-provider: ${{ vars.GCP_KMS_KEY }} | ||
| secrets: inherit | ||
|
|
||
| preview-create: | ||
| needs: init | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: preview | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit | ||
|
|
||
| up: | ||
| needs: preview-create | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: up | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit | ||
|
|
||
| preview-nop: | ||
| needs: up | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: preview | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit | ||
|
|
||
| destroy: | ||
| needs: [up, preview-nop] | ||
| if: always() && needs.up.result == 'success' | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: destroy | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit | ||
|
|
||
| preview-recreate: | ||
| needs: destroy | ||
| if: always() && needs.destroy.result == 'success' | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: preview | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit | ||
|
|
||
| stack-rm: | ||
| needs: [destroy, preview-recreate] | ||
| if: always() && needs.destroy.result == 'success' | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: stack-rm | ||
| stack: test-${{ github.run_id }} | ||
| project: e2e | ||
| working-directory: test | ||
| comment-on-pr: false | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Test | ||
| run-name: 'test: pulumi ${{ inputs.cmd }}' | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| cmd: | ||
| description: 'Pulumi command' | ||
| required: true | ||
| default: 'preview' | ||
| type: choice | ||
| options: | ||
| - preview | ||
| - up | ||
| - refresh | ||
| - destroy | ||
| - init | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: write | ||
| actions: read | ||
|
|
||
| jobs: | ||
| pulumi: | ||
| uses: ./.github/workflows/pulumi.yml | ||
| with: | ||
| cmd: ${{ inputs.cmd }} | ||
| stack: test | ||
| project: pulumi-v1-test | ||
| working-directory: test | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| config: | ||
| aws:region: us-east-1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| name: pulumi-v1-test | ||||||
| description: Test stack for the pulumi-v1 reusable workflow | ||||||
| runtime: python | ||||||
| backend: | ||||||
| url: gs://oa-pulumi | ||||||
|
Comment on lines
+4
to
+5
|
||||||
| backend: | |
| url: gs://oa-pulumi |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,41 @@ | ||||||
| """Test stack for the pulumi-v1 reusable workflow. | ||||||
|
|
||||||
| Creates lightweight, free AWS resources to exercise `pulumi preview --patch` | ||||||
| diff output, job summaries, and PR comments. | ||||||
| """ | ||||||
| import pulumi | ||||||
| import pulumi_aws as aws | ||||||
| import pulumi_tls as tls | ||||||
|
|
||||||
| config = pulumi.Config() | ||||||
|
||||||
| config = pulumi.Config() |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says the IAM role has “no trust policy”, but assume_role_policy is explicitly set. Please either adjust the comment to match the code, or change the role definition to align with the intent (e.g., a minimal/valid trust policy for a dummy role).
| # IAM Role (no trust policy; just exists for diff testing) | |
| # IAM Role (deny-all trust policy; just exists for diff testing) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| pulumi>=3.0.0 | ||
| pulumi-aws>=6.0.0 | ||
| pulumi-tls>=5.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initandstack-rmexit before writingpulumi-output.txt, so the “Summary and PR comment” step will always be skipped for these commands. If these commands are intended to be first-class workflow commands, consider capturing their output topulumi-output.txt(and letting the summary step run) to aid debugging/visibility.