我们有什么方法可以阻止Bitbucket管道建设?
这个过程花了超过25分钟?
.yml文件内容为: -
image: node:8.9.4
pipelines:
default:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
- if [ $BITBUCKET_BRANCH == 'master' ]; then
- npm install -g @angular/cli
- npm install -g firebase-tools
- npm install
- ng build
- firebase deploy --only hosting --token "$FIREBASE_TOKEN" --public dist
- fi
答案 0 :(得分:3)
答案 1 :(得分:1)
您正在每次运行时从npm安装所有库,使用已安装了npm和firebase工具的docker镜像,如下所示:https://hub.docker.com/r/devillex/docker-firebase/,这将显着缩短构建时间
答案 2 :(得分:0)
如果您的意思是停止工作。 试试吧。
项目名称->设置->管道设置->设置->启用管道
答案 3 :(得分:0)
您可以设置位桶流水线的最长时间:
options:
max-time: 15
pipelines:
branches:
.........
通过添加以上属性,您的位桶管道将在15分钟后自动中止。
答案 4 :(得分:0)
看起来您已经找到了答案,但是请注意,当您推送到存储库时,也可以在提交消息中包含[skip ci]
。除非这会更新链接到构建的现有拉取请求,否则它不会触发您的管道。