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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南