cdklabs / cdklabs/cdk-pipelines-github
GitHub environment setting for all Jobs.
- Dominant language
- TypeScript
- Stars
- 384
- Forks
- 45
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 4
Description
We need to specify the `environment: tst` job property everywhere that needs AWS logging in because of a condition on the thrust policy of the AWS IAM role. I can only add it tho using `pipeline.addStageWithGitHubOptions` and this adds it to the deployment, but not the uploading of the **assets**. I also can't seem to figure out how to JsonPatch the `environment: tst` in under each individual jobs, since it does not support wildcards.
How can I set a GitHub environment for the synth and asset part of the pipeline?
We worked around this for now doing:
```ts
["Assets-FileAsset1", "Assets-FileAsset2", "Assets-FileAsset3"].forEach(
(jobName) => {
workflow.patch(
JsonPatch.add(`/jobs/${jobName}`, { environment: "tst" })
);
}
);
```
Contributor guide
Assessment
This issue has not been assessed yet.