- Newest
- Most votes
- Most comments
Hello.
You can reference pipeline level variables in buildspec.yml by configuring the following document.
Set environment variables in the build phase settings when configuring CodePipeline.
Set the buildspec.yml to refer to that environment variable.
https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-pipeline-variables.html
Under Environment variables - optional, to create an environment variable as an input variable for the build action that will be resolved by the pipeline-level variable, choose Add environment variable. This will create the variable specified in the buildspec as $CUSTOM_VAR1. In Name, enter CUSTOM_VAR1. In Value, enter #{variables.timeout}. In Type, choose Plaintext.
The #{variables.timeout} value for the environment variable is based on the pipeline-level variable namespace variables and the pipeline-level variable timeout created for the pipeline in step 5.
Pipeline level variables are set in the following parts.
Under Variables, choose Add variable. In Name, enter timeout. In Default, enter 1000. In description, enter the following description: Timeout.
Relevant content
- AWS OFFICIALUpdated 2 years ago
