3

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?

Silver Quettier
  • 2,045
  • 2
  • 26
  • 53

2 Answers2

2

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

5oBero
  • 36
  • 1
  • 6
0

If you're using the value of that variables in the S3Deploy action, have you tried using env/exported-variables in your buildspec.yml file?

More information available here

  • No, it's not used in the S3Deploy action, I configured the deploy action to simply get everything from the BuildArtifact regardless of file name. – Silver Quettier Dec 10 '20 at 08:39