Issue
I am using AWS CDK and want to use parameters stored in Gitlab as variables in CDK build.
Someone tried something like this?
Solution
Solutions found:
Create custom variable in Gitlab (with the same repository as project) in two ways:
In pipeline file with project (not sensitive data)
In project properties in Gitlab (recomended solution if want to store sensitive params as credentials - those parameters should not be stored with project in file)
Declare custom env in main CDK file (e.x.
const CUSTOM_ENV = ${CUSTOM_ENV}
)Call
cdk deploy
with created parameter e.g.cdk deploy $CUSTOM_ENV
and the variable will be automatically delivered by Gitlab.
More details how to declare variables - Gitlab docs
Answered By - CeZet Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.