CodePipeline how to make artifact locations accessible to CodeBuild

1

I want to retrieve artifact locations, currently has create additional actions to invoke custom lambda function, to read the artifact locations from the CodePipeline Job event data.

Can this information be retrieved in another way e.g. exposed as environment variables, or even an API/CLI call? This would be useful to be able to raise events to perform asynchronous post processing steps on artifacts (such as test results).

질문됨 6년 전1939회 조회
1개 답변
0
수락된 답변

Hi,

CodePipeline uses S3 to store pipeline artifacts - from https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html:

When you use the console to create your first pipeline, AWS CodePipeline creates an Amazon S3 bucket in the same region as the pipeline to store items for all pipelines in that region associated with your account. Every time you use the console to create another pipeline in that region, AWS CodePipeline creates a folder for that pipeline in the bucket. It uses that folder to store artifacts for your pipeline as the automated release process runs. This bucket is named codepipeline-region-1234567EXAMPLE, where region is the AWS region in which you created the pipeline, and 1234567EXAMPLE is a ten-digit random number that ensures the bucket name is unique.

You can use the GetPipeline API to get info about a specific pipeline; in the response you then have the 'artifactStore' info that contains the details about the S3 bucket - https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-artifactStore.

AWS
답변함 6년 전

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

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

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

관련 콘텐츠