Skip to content
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

GitHub environment setting for all Jobs. #517

Open
gbvanrenswoude opened this issue Feb 20, 2023 · 1 comment
Open

GitHub environment setting for all Jobs. #517

gbvanrenswoude opened this issue Feb 20, 2023 · 1 comment

Comments

@gbvanrenswoude
Copy link
Contributor

gbvanrenswoude commented Feb 20, 2023

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:

["Assets-FileAsset1", "Assets-FileAsset2", "Assets-FileAsset3"].forEach(
  (jobName) => {
    workflow.patch(
      JsonPatch.add(`/jobs/${jobName}`, { environment: "tst" })
    );
  }
);
@kaizencc
Copy link
Contributor

kaizencc commented Mar 2, 2023

We have a concept for this, called jobSettings, which can be set at the GitHubWorkflow level. However, it does not include environment right now (but it should!). I'm going to mark this issue as a feature request for adding that property to jobSettings.

Hopefully this is something you'd be willing to contribute @gbvanrenswoude, and if so, keep in #518 might change the type for environment a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants