Conversation
kaizencc
left a comment
There was a problem hiding this comment.
I don't have any major points of contention so instead I have a few nitpicky ones.
| this.exportedVariables.add(variableName); | ||
|
|
||
| // return `#{${this.variablesNamespace}.${variableName}}`; | ||
| return new StepOutput(this, variableName).toString(); |
There was a problem hiding this comment.
I'm confused why we are sending variableName as the value for engineSpecificInformation to StepOutput. It doesn't seem like the variable name is engine specific. Feels like engineSpecificInformation could be named better.
There was a problem hiding this comment.
The idea about "engineSpeicificInformation" is that it is arbitrary information that doesn't matter to the framework.
It matters to the engine, and only the engine gets to interpret it.
In this case, for the CodePipeline engine, the only thing necessary is the variable name (as the step itself is already known).
I suppose I could make it just a string, and if the engine needs to encode something else into it, it can just JSON-encode something in there...?
| ? { _PROJECT_CONFIG_HASH: projectConfigHash } | ||
| : {}; | ||
|
|
||
|
|
| }); | ||
| new PipelineStack(app, 'VariablePipelineStack', { | ||
| env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | ||
| }); | ||
| app.synth(); No newline at end of file |
There was a problem hiding this comment.
| }); | |
| new PipelineStack(app, 'VariablePipelineStack', { | |
| env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | |
| }); | |
| app.synth(); | |
| }); | |
| new PipelineStack(app, 'VariablePipelineStack', { | |
| env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | |
| }); | |
| app.synth(); |
| /** | ||
| * Additional data on the output, to be interpreted by the engine | ||
| */ | ||
| public readonly engineSpecificInformation: any; |
There was a problem hiding this comment.
I don't like and/or don't understand this naming convention. I get that it is engine specific, but I don't see the need to call this out in the name and make it so cryptic. We are sending in the variableName in codepipeline, what other values are you imagining could be sent in here?
There was a problem hiding this comment.
Depends on the engine.
For CodePipeline, it happens to be the variable name. But I suppose I can rename it. Let's talk later today.
Co-authored-by: Kaizen Conroy <36202692+kaizen3031593@users.noreply.github.com>
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Make it possible to export environment variables from a CodeBuildStep,
and pipeline sources, and use them in the environment variables of
a CodeBuildStep or ShellStep.
Closes #17189, closes #18893, closes #15943, closes #16407.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license