Cloudformation not supporting Full Clone in Output artifact format for codepipeline

0

I am working on CFT which pulls code from GitHub with 2.0 OAuth app version and my buildspec needs git metadata to work with.

if my requirement is unclear, look at this feature in aws docs for better understanding.

Below is the code I have for CFT

  CodePipelineGitHub:
    Type: AWS::CodePipeline::Pipeline
    Properties:
      RoleArn: !Ref CodePipelineServiceRole
      ArtifactStore:
        Type: S3
        Location: !Ref CodePipelineArtifactBucket
      Stages:
        - Name: source
          Actions:
            - Name: aa-source
              ActionTypeId:
                Category: Source
                Owner: AWS
                Version: 1
                Provider: CodeStarSourceConnection
              Configuration: 
                ConnectionArn: !Ref ConnectionArn
                FullRepositoryId: !Ref GitSourceRepo #"some-user/my-repo"
                BranchName: !Ref GitBranch
              OutputArtifacts:
                - Name: SourceArtifact
              RunOrder: 1

But from GUI, we have option to get the .git metadata into the source output artifact.

Please provide a solution to get the git metadata into the build stage.

1回答
0

You can try adding:

OutputArtifactFormat: CODEBUILD_CLONE_REF

To the action's Configuration, that should address the full clone.

AWS
エキスパート
Raphael
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ