Search code examples
environment-variablesaws-codepipelineaws-codecommit

CodeCommit not outputing expected environment variables to CodePipeline namespace


I'm trying to setup a pipeline through the AWS web console. The whole thing runs smoothly, but I have a problem with the varaibles outputted by CodeCommit that should be available to the following actions.

In the CodeCommit action configuration, the Variables namespace is set to SourceVariables. enter image description here

In the CodeBuild action configuration, I defined a BRANCH environment variable supposed to map BranchName of the SourceVariables namespace, which should be outputted by the CodeCommit action based on this variable reference.

The BRANCH substitution works in CodeBuild... and yet.

enter image description here

This is hardly what I expected.

What am I missing in order to CodePipeline to value this environment variable from CodeCommit as expected?


Solution

  • The image you provided is from the CodeBuild configuration page, but you need to set your environment variable in the CodePipeline Action configuration page.enter image description here