【发布时间】:2023-02-16 02:12:15
【问题描述】:
我找不到适合我的案例的令人满意的解决方案。
我只想在以前的某个工作失败时手动开始工作。有问题的工作进行了验证。我想制作下一份工作手册,以便用户承认某些事情不好,并让他调查问题并仅在他认为可以忽略失败时才继续。
stages:
- test
- validate
- build
lint:
stage: test
allow_failure: true
script:
- npm run lint
check:reducer:
stage: test
allow_failure: true
script:
- chmod +x ./check-reducers.py
- ./check-reducers.py $CI_PROJECT_ID $CI_COMMIT_BRANCH
except:
- master
- development
fail:pause:
stage: validate
allow_failure: true
script:
- echo The 'validate:reducer' job has failed
- echo Check the job and decide if this should continue
when: manual
needs: ["check:reducer"]
build:
stage: build
script:
- cp --recursive _meta/ $BUILD_PATH
- npm run build
artifacts:
name: "build"
expire_in: 1 week
paths:
- $BUILD_PATH
needs: ["fail:pause"]
我希望如果 check:reducer 失败,fail:pause 等待用户输入。如果 check:reducer 以 0 退出,fail:pause 应该自动启动或 build 应该启动。
【问题讨论】:
标签: gitlab conditional-statements gitlab-ci jobs manual