kim*_*y82 4 bitbucket bitbucket-pipelines
我在Bitbucket中有一个CI管道,该管道正在构建,测试和部署应用程序。事实是,在部署之后,我要运行硒测试。硒测试位于Bitbucket的另一个存储库中,它们具有自己的管道。
Bitbucket管道中是否有触发步骤,以在上一个管道完成时触发管道?
我不想对测试存储库进行虚假推送以触发这些测试。
我能想到的最“正确”的方法是在部署完成后,使用Bitbucket REST API手动触发另一个存储库上的管道。
这里有几个如何创建管道的示例:https : //developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/#post
复制+粘贴第一个示例。如何为主服务器上的最新提交触发管道:
$ curl -X POST -is -u username:password \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \
-d '
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "master"
}
}'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1484 次 |
| 最近记录: |