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

posta 6 anni fa1939 visualizzazioni
1 Risposta
0
Risposta accettata

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
con risposta 6 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande