0

目前,在我的 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
4

1 回答 1

1

我知道这可能为时已晚,无法帮助您,但这是他们打算在 V9.0 中修复的一个已知问题。

https://gitlab.com/gitlab-org/gitlab-ce/issues/26360

于 2017-02-27T14:34:42.643 回答