famous-airline-5409
08/02/2024, 4:46 AMpulumi env run
) in Github actions?enough-architect-32336
08/02/2024, 10:02 PMrefined-alligator-39489
08/02/2024, 10:08 PMpulumi env run
as a wrapper over the command?red-match-15116
08/04/2024, 6:35 PMred-match-15116
08/04/2024, 8:30 PMpulumi env open my_org/my_env --format dotenv >> $GITHUB_ENV
gifted-gigabyte-53859
08/30/2024, 7:01 AMRun bash ./test.sh
Reminder: prod isn't tested by default as it disturbs everyone. To test all environments, use --all
Logging in using access token from PULUMI_ACCESS_TOKEN
./test.sh: Testing 'CFG0120-Sample-RDS-db-90pct-CPU-sandbox'
./test.sh: Running command: pulumi env run aws-pin-prod-legacy -- aws cloudwatch set-alarm-state --alarm-name ''CFG0120-Sample-RDS-db-90pct-CPU-sandbox'' --state-value ALARM --state-reason 'testing purposes'
Error: [404] Not Found: Environment 'aws-pin-prod-legacy' not found
Here is my Github actions code:
name: deploy to sandbox and run test, on PRs
on:
push:
branches:
- master
pull_request: {}
jobs:
deploy-and-test:
name: deploy to sandbox and run test script
runs-on: ubuntu-latest
steps:
# checkout the repo code (eyeroll)
- name: Check out the repository code
uses: actions/checkout@v4
# run test script
- name: run test.sh
run: bash ./test.sh
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
Logging in with the same token on my laptop cli, works fine.red-match-15116
08/30/2024, 3:40 PMpulumi env run {my-org}/aws-pin-prod-legacy
It works on your machine because you likely have a default org setgifted-gigabyte-53859
09/02/2024, 1:16 AM