目前,在我的gitlab配置工作流程中,我有一些手动阶段测试。所以我可以决定测试是通过还是失败。现在,默认情况下总是跳过手动步骤。无论何时正常阶段步骤建立,它都跳到另一个正常阶段而不考虑手动步骤。现在,我如何才能使它发挥作用。请帮助我。
stages:
- start_pipeline
- auto_testing
- manual_test_PASS
- manual_test_FAIL
- UAT_test_PASS
- UAT_test_FAIL
- Validation_PASS
- Validation_FAIL
- merge_to_master
variables:
start_pipeline:
stage: start_pipeline
script:
- if [[ -d "$USER_DIR" ]]; then echo -e "Direcory exists"; else sudo mkdir -p $USER_DIR; fi
- sudo chown -R root:gitlab-runner ${TARGET}/*
auto_testing:
stage: auto_testing
script:
- find . -type d -name "manifests" -exec chown -R gitlab-runner:gitlab-runner {} \;
- find . -type d -name "manifests" -exec puppet parser validate {} \;
- if [[ -d "$PRODUCTION_TARGET" ]]; then echo -e "Direcory exists"; else sudo mkdir -p $PRODUCTION_TARGET; fi
- if [[ -d "$LAB_TARGET" ]]; then echo -e "Direcory exists"; else sudo mkdir -p $LAB_TARGET; fi
manual_test_FAIL:
stage: manual_test_FAIL
script:
- echo "FAIL"
- exit 1;
when: manual
manual_test_PASS:
stage: manual_test_PASS
script:
- echo "PASS"
- sudo cp -r * ${TARGET}/${MODIFIED_COMMIT_USER}/
- sudo cp -r * ${LAB_TARGET}/
- sudo cp -r * ${PRODUCTION_TARGET}/
dependencies:
- auto_testing
答案 0 :(得分:1)
我知道这可能为时已晚,无法为您提供帮助,但这是一个已知问题,他们正在定位以修复V9.0。