1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
Another potential way is using variables in CodePipeline. We need to export variables in CodeBuild BuildSpec, then access the variables in later stages. For example, create a CodeBuild project with exported-variables
const codeBuildProject = new codebuild.PipelineProject({
buildSpec: aws_codebuild.BuildSpec.fromObject({
...
env: {
// save the imageTag environment variable as a CodePipeline Variable
'exported-variables': [
'imageTag',
],
}
})
})
CodeBuild action
const codeBuildAction = new codepipeline_actions.CodeBuildAction({
actionName: 'CodeBuildActionName',
project: codeBuildProject,
input: sourceOutput,
});
then access this variable in Deploy stage
codeBuidlAction.variable('imageTag')
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 10달 전
- AWS 공식업데이트됨 2년 전