自2018年9月4日起,亚马逊增加了对多种输入源的支持:
https://aws.amazon.com/about-aws/whats-new/2018/08/aws-codebuild-adds-ability-to-create-build-projects-with-multiple-input-sources-and-output-文物/
从文档:
{
"name": "sample-project",
"source": {
"type": "S3",
"location": "bucket/sample.zip"
},
"secondarySources": [
{
"type": "CODECOMMIT",
"location": "https://git-codecommit.us-west-2.amazonaws.com/v1/repos/repo"
"sourceIdentifier": "source1"
},
{
"type": "GITHUB",
"location": "https://github.com/awslabs/aws-codebuild-jenkins-plugin"
"sourceIdentifier": "source2"
}
],
version: 0.2
phases:
build:
commands:
- cd $CODEBUILD_SRC_DIR_source1
- touch file1
- cd $CODEBUILD_SRC_DIR_source2
- touch file2
artifacts:
secondary-artifacts:
artifact1:
base-directory: $CODEBUILD_SRC_DIR_source1
files:
- file1
artifact2:
base-directory: $CODEBUILD_SRC_DIR_source2
files:
- file2