在开始创建管道时,我使用了初学者模板:
# 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“状态,我不想这样做,因为我计划按州过滤管道,以用于其他目的。我怎么才能取消这个?
管道可以在一定时间后自动取消吗?
编辑
我尝试rerun,然后立即停止它,但运行仍然作为Paused在那里。所以它不是In progress,但它仍然只是在外面闲逛。此外,虽然UI没有显示正在进行中,但/pipelines/ GET端点返回的/pipelines/如下所示:
"state": {
"name": "IN_PROGRESS",
"type": "pipeline_state_in_progress",
"stage": {
"name": "PAUSED",
"type": "pipeline_state_in_progress_paused"
}
},有没有办法只是删除和清理这一运行?

发布于 2022-06-08 07:15:03
解决办法是启动它,然后立即停止它。管道将显示为停止。
工作人员等待时间加上安装阶段通常足够慢,以至于您的管道步骤脚本甚至不会启动。
但是,请记住,部署步骤可以单独重新部署,完整的管道可以重新运行。因此,你不能有效地不可逆转地取消这条管道,因为它在未来任何时候都不能被部署到生产中。
https://stackoverflow.com/questions/72533482
复制相似问题