我是初中时使用gitlab-ci。我有一个包含两个文件夹/应用程序的存储库,并且想在其中一个应用程序更改以下gitlab-ci文件配置时停止每次提交的自动构建/部署:
我已在文档https://docs.gitlab.com/ee/ci/enable_or_disable_ci.html
中添加了default_projects_features:
builds: false
services:
- docker:dind
stages:
- build
- deploy
build:
image: node:latest
stage: build
script:
- npm install --quiet
- ./node_modules/@angular/cli/bin/ng build --progress false
except:
- tags
do_publish:
image: docker:stable
stage: deploy
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- apk update && apk add bash
script:
...
但是不知道我在做什么错。
Auth.auth().currentUser?.reload()
答案 0 :(得分:1)
default_projects_features
是网站范围的管理员功能。在.gitlab-ci.yml
中没有任何意义。
如果要在分支上禁用构建,则可以:
.gitlab-ci.yml
.build:
image: node:latest
...