如何更新之前创建的 AWS CodePipeline Build Provider?
How to update a previously created AWS CodePipeline Build Provider?
我之前使用 CodePipeline 控制台创建了一个 Jenkins 构建提供程序。在创建过程中,它要求 Jenkins 服务器 URL.
现在,我需要更改我的 Jenkins 服务器 URL,但是当我尝试编辑时,没有任何选项可以更改构建提供程序。请参阅下面的快照:
我看到的唯一解决办法是添加一个新的。
我尝试使用 aws-cli 获取管道,
aws codepipeline get-pipeline --name <pipeline-name>
但 JSON 响应仅引用了构建提供程序:
...
},
{
"name": "Build",
"actions": [
{
"inputArtifacts": [
{
"name": "APIServer"
}
],
"name": "Build",
"actionTypeId": {
"category": "Build",
"owner": "Custom",
"version": "1",
"provider": "jenkins-api-server"
},
"outputArtifacts": [
{
"name": "APIServerTarball"
}
],
"configuration": {
"ProjectName": "api-server-build"
},
"runOrder": 1
}
]
},
{
我也找不到任何其他命令来管理构建提供程序。所以我的问题是我应该在哪里以及如何更新 AWS CodePipeline 中的现有构建提供程序配置?
Jenkins 操作实际上定义为 custom action in your account. If you want to update the action configuration you can define a new version using the create custom action type API。您的更改将是新的 "version" 操作类型,因此您可以更新管道中的 actionTypeId 以指向您的新版本。
完成后,您还可以delete the old version阻止它出现在操作列表中。
关于 Jenkins URL 更改,一个解决方案是设置一个 DNS 记录(例如通过 Route53)指向您的 Jenkins 实例并在您的操作配置中使用 DNS 主机名。这样您以后就可以重新映射 DNS 记录而无需更新您的管道。
我之前使用 CodePipeline 控制台创建了一个 Jenkins 构建提供程序。在创建过程中,它要求 Jenkins 服务器 URL.
现在,我需要更改我的 Jenkins 服务器 URL,但是当我尝试编辑时,没有任何选项可以更改构建提供程序。请参阅下面的快照:
我看到的唯一解决办法是添加一个新的。
我尝试使用 aws-cli 获取管道,
aws codepipeline get-pipeline --name <pipeline-name>
但 JSON 响应仅引用了构建提供程序:
...
},
{
"name": "Build",
"actions": [
{
"inputArtifacts": [
{
"name": "APIServer"
}
],
"name": "Build",
"actionTypeId": {
"category": "Build",
"owner": "Custom",
"version": "1",
"provider": "jenkins-api-server"
},
"outputArtifacts": [
{
"name": "APIServerTarball"
}
],
"configuration": {
"ProjectName": "api-server-build"
},
"runOrder": 1
}
]
},
{
我也找不到任何其他命令来管理构建提供程序。所以我的问题是我应该在哪里以及如何更新 AWS CodePipeline 中的现有构建提供程序配置?
Jenkins 操作实际上定义为 custom action in your account. If you want to update the action configuration you can define a new version using the create custom action type API。您的更改将是新的 "version" 操作类型,因此您可以更新管道中的 actionTypeId 以指向您的新版本。
完成后,您还可以delete the old version阻止它出现在操作列表中。
关于 Jenkins URL 更改,一个解决方案是设置一个 DNS 记录(例如通过 Route53)指向您的 Jenkins 实例并在您的操作配置中使用 DNS 主机名。这样您以后就可以重新映射 DNS 记录而无需更新您的管道。