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).

asked 6 years ago1927 views
1 Answer
0
Accepted Answer

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
answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions