Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rupertbg/1fbdec3dfa746e0d5eee69234d995689 to your computer and use it in GitHub Desktop.
Save rupertbg/1fbdec3dfa746e0d5eee69234d995689 to your computer and use it in GitHub Desktop.
Get a CodePipeline Execution ID from within a CodeBuild Job
aws codepipeline get-pipeline-state --region us-west-2 --name ${CODEBUILD_INITIATOR#codepipeline/} --query 'stageStates[?actionStates[?latestExecution.externalExecutionId==`'${CODEBUILD_BUILD_ID}'`]].latestExecution.pipelineExecutionId' --output text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment