AWS Codepipeline支持跟踪多个代码仓库。可以通过Pipeline的Sourceaction中的inputArtifactVariables属性来指定不同的代码仓库。
以下是一个实例,其中source action 1和source action 2分别指向不同的代码仓库。
{
"pipeline": {
"stages": [
{
"name": "Source",
"actions": [
{
"name": "SourceAction1",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"version": "1",
"provider": "GitHub"
},
"configuration": {
"Owner": "owner",
"Repo": "repo1",
"Branch": "master",
"OAuthToken": "{{GitHubToken}}"
},
"outputArtifacts": [
{
"name": "SourceArtifact1"
}
],
"runOrder": 1
},
{
"name": "SourceAction2",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"version": "1",
"provider": "GitHub"
},
"configuration": {
"Owner": "owner",
"Repo": "repo2",
"Branch": "master",
"OAuthToken": "{{GitHubToken}}"
},
"outputArtifacts": [
{
"name": "SourceArtifact2"
}
],
"runOrder": 1
}
]
},
...
}
}