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
feat(pipelines): step outputs #19024
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...?
@@ -307,13 +315,15 @@ export class CodeBuildFactory implements ICodePipelineActionFactory { | |||
? { _PROJECT_CONFIG_HASH: projectConfigHash } | |||
: {}; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line?
}); | ||
new PipelineStack(app, 'VariablePipelineStack', { | ||
env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | ||
}); | ||
app.synth(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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