Is there a way to change the name of the artifact getting stored in s3 during build stage of codepipeline?

0

I want to modify the name of the artifact getting created during the build stage of codepipeline in order to maintain versions of the builds and apply a lifecycle policy on the bucket. Is there a way to achieve this?

1개 답변
0

If you are using CloudFormation to provision the CodeBuild project (Assuming you are using a CodeBuild Project for your Build stage) It has the override artifact name property (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html) that allows for the name to be overridden in the buildspec.yml file.

This should allow you to do what you want as it allows the artifact name to be defined at build time.

AWS
답변함 2년 전
  • I am using terraform to provision infrastructure. I tried the above solution but it did not work. Codepipeline is giving a unique name for the build everytime.

  • Good link. It's also worth noting on that page it says the following:

    Name If type is set to CODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild.

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

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

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

관련 콘텐츠