cdklabs / cdklabs/cdk-pipelines-github

GitHub environment setting for all Jobs.

Open
#517 1 comment 0 reactions 0 assignees View on GitHub
effort-small feature-request p2
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.