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

aws-cdk-lib/pipelines: CodeBuildStep should support CodePipeline variables #16684

Closed
2 tasks
jpeinola opened this issue Sep 28, 2021 · 2 comments
Closed
2 tasks
Assignees
Labels
@aws-cdk/pipelines CDK Pipelines library feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@jpeinola
Copy link

jpeinola commented Sep 28, 2021

The current CodeBuildStep API doesn't include variable property and CodeBuildStepProps doesn't include variablesNamespace property. As a result variables exported in CodeBuild (exporting variable using export VARIABLE_NAME in script and defining the variable in buildspec's env-block using exported-variables) are not visible as CodePipeline variables.

Currently this can be done by using CodeBuildAction from codepipeline_actions library along with ICodePipelineActionFactory. However, implementing this kind of wrapper creates unnecessary increase in the amount of code.

Use Case

In some cases I need to resolve artifact version in CodeBuild and pass it to downstream actions in pipeline.

Proposed Solution

  1. Extend CodeBuildStepProps API to take variablesNamespace and expose variables exported in CodeBuild to CodePipeline variables.
  2. Extend CodeBuildStep API to include variable-property so the variables defined in CodeBuildStep can be referenced in downstream actions using syntax like myCodeBuildStep.variable('MY_FUNNY_VARIABLE') in cdk code.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@jpeinola jpeinola added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 28, 2021
@github-actions github-actions bot added the @aws-cdk/aws-codepipeline Related to AWS CodePipeline label Sep 28, 2021
@skinny85 skinny85 added @aws-cdk/pipelines CDK Pipelines library and removed @aws-cdk/aws-codepipeline Related to AWS CodePipeline labels Oct 18, 2021
@skinny85 skinny85 assigned rix0rrr and unassigned skinny85 Oct 18, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Oct 20, 2021

Duplicate of #15943 and #16407.

@rix0rrr rix0rrr closed this as completed Oct 20, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/pipelines CDK Pipelines library feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants