如何取消正在等待手动触发器的管道?
我在开始创建管道时使用了入门模板:
# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
script:
- echo "Your security scan goes here..."
# The following deployment steps will be executed for each pipeline run. To configure your steps and conditionally deploy see https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/
- step:
name: 'Deployment to Staging'
deployment: staging
script:
- echo "Your deployment to staging script goes here..."
- step:
name: 'Deployment to Production'
deployment: production
trigger: 'manual'
script:
- echo "Your deployment to production script goes here..."
运行此管道时,它会等待手动触发阶段:
我不想运行该阶段并只想取消管道,但是我找不到UI中的任何按钮。目前,它悬挂在我不想要的“ in_progress”状态下,因为我计划出于其他目的按状态过滤管道。我如何取消此?
一定时间后,可以将管道设置为自动取消吗?
编辑
我尝试重新延迟
,然后立即停止它,但是运行仍在暂停
时。因此,它不是在进行中的,但仍然只是在那里闲逛。另外,虽然UI未显示其正在进行的
状态
,/pipelines/
获取端点是这样的:
"state": {
"name": "IN_PROGRESS",
"type": "pipeline_state_in_progress",
"stage": {
"name": "PAUSED",
"type": "pipeline_state_in_progress_paused"
}
},
是否没有办法只需删除并清理这个运行?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方法是启动它,然后立即将其停止。管道将显示为停止。
工人等待时间加上设置阶段通常足够慢,以使您的管道步骤脚本甚至无法启动。
但是,请记住,可以单独重新部署部署步骤,并且可以重新运行完整的管道。因此,您不能以在将来无法将其部署到生产的方式上有效地取消该管道。
A workaround is to start it and then immediately stop it. The pipeline would show as stopped.
The worker waiting time plus the setup phase are usually slow enough so that your pipeline step script would not even start.
Yet, keep in mind that the deploy steps can be individually redeployed and the full pipeline can be re-run. So you can't effectively irreversibly cancel that pipeline in a way that it can't be deployed to production in any future.