1 Answer
- Newest
- Most votes
- Most comments
0
I did those steps :
1 - Sign in to the AWS Management Console and open the CodePipeline console at http://console.aws.amazon.com/codesuite/codepipeline/home.
2 - Choose the pipeline => choose Edit. On the stage that contains your CodeBuild action, choose Edit stage.
3- Choose the icon to edit your CodeBuild action.
4 - On the Edit action page, under Environment variables, enter the following:
-
In Name, enter a name for your environment variable.
-
In Value, enter the variable syntax for your pipeline output variable: #{SourceVariables.BranchName}.
-
In Type, choose Plaintext.
then in code buildSpec you access the resolved value like $VAR_NAME
answered 2 years ago
Relevant content
- asked a year ago
- asked 3 months ago
- Accepted Answerasked a month ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
I added in code Build => environment variables section an env var :
BRANCH_NAME, #{SourceVariables.BranchName}, plaintext
when I read it in code build I have an output string equals to "#{SourceVariables.BranchName}" instead of "main"