How to access commitid during CodeDeploy stage of a CodePipeline execution?

0

I have a CodePipeline with a Source (CodeCommit), Build (CodeBuild) and Deploy (CodeDeploy) stage. This is for a Node.js application deploying to an AutoScaling group (Blue/Green). My CodeBuild stage runs a few Gulp scripts to minify CSS and JS files, append the commitid to the filename and then copies them to S3. I can pass the commitid during CodeBuild stage using #{SourceVariables.CommitId}. However, I cannot do the same during my CodeDeploy stage. I need the commitid during the deploy stage so that I can write it to a .env file within the Node.js application route directory. My application uses string interpolation to append ${process.env.COMMIT_ID} to the CSS and JS filenames within the HTML.

질문됨 일 년 전74회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠