尝试在AWS CodeBuild上启动构建时出现此错误:
CLIENT_ERROR:找不到针对主要来源和来源版本0b0b4b6ebc477f92c2d51f2ac4ad0fc0ebc46782的参考增量
此错误是由git还是AWS CodeBuild本身引起的?我该如何删除?
更新1:
这是我的CloudFormation配置模板:
CodeBuildProject:
Type: AWS::CodeBuild::Project
Properties:
Artifacts:
Type: NO_ARTIFACTS
Cache:
Location: LOCAL
Modes:
- LOCAL_CUSTOM_CACHE
Type: LOCAL
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:1.0
ImagePullCredentialsType: CODEBUILD
Type: LINUX_CONTAINER
LogsConfig:
CloudWatchLogs:
Status: ENABLED
GroupName: !Join ['/', ['', 'aws', 'codebuild', !Sub '${AWS::StackName}CodeBuildProject']]
Name: !Sub '${AWS::StackName}CodeBuildProject'
ServiceRole: !GetAtt CodeBuildProjectIAMRole.Arn
Source:
BuildSpec: |
version: 0.2
phases:
install:
commands:
- npm install -g yarn
- git config --global credential.helper '!aws codecommit credential-helper $@'
- git config --global credential.UseHttpPath true
- yarn
pre_build:
commands:
- git rev-parse HEAD
- git pull origin master
build:
commands:
- yarn run build
- yarn run deploy
post_build:
commands:
- echo 'Finished.'
GitCloneDepth: 0
Location: !ImportValue CodeCommitRepositoryCloneUrlHttp
Type: CODECOMMIT