Loading templates/gitlab-ci-robotframework.yml +47 −18 Original line number Diff line number Diff line Loading @@ -13,14 +13,56 @@ # program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth # Floor, Boston, MA 02110-1301, USA. # ========================================================================================= # default workflow rules # default workflow rules: Merge Request pipelines workflow: rules: # exclude merge requests - if: $CI_MERGE_REQUEST_ID # prevent branch pipeline when an MR is open (prefer MR pipeline) - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' when: never - when: always # test job prototype: implement adaptive pipeline rules .test-policy: rules: # on tag: auto & failing - if: $CI_COMMIT_TAG # on ADAPTIVE_PIPELINE_DISABLED: auto & failing - if: '$ADAPTIVE_PIPELINE_DISABLED == "true"' # on production or integration branch(es): auto & failing - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # early stage (dev branch, no MR): manual & non-failing - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null' when: manual allow_failure: true # Draft MR: auto & non-failing - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/' allow_failure: true # else (Ready MR): auto & failing - when: on_success # acceptance job prototype: implement adaptive pipeline rules .acceptance-policy: rules: # exclude tags - if: $CI_COMMIT_TAG when: never # on production or integration branch(es): auto & failing - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # disable if no review environment - if: '$REVIEW_ENABLED != "true"' when: never # on ADAPTIVE_PIPELINE_DISABLED: auto & failing - if: '$ADAPTIVE_PIPELINE_DISABLED == "true"' # early stage (dev branch, no MR): manual & non-failing - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null' when: manual allow_failure: true # Draft MR: auto & non-failing - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/' allow_failure: true # else (Ready MR): auto & failing - when: on_success variables: # variabilized tracking image TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master" Loading Loading @@ -322,12 +364,7 @@ robotframework-lint: # /!\ Work around '$ROBOT_PROJECT_IMAGE != "$ROBOT_BASE_IMAGE"' doesn't work - if: "$ROBOT_PROJECT_IMAGE !~ /ROBOT_BASE_IMAGE/" when: never # on production and integration branch(es): auto (on_success) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' allow_failure: true # on other branch(es): manual & non-blocking - when: manual allow_failure: true - !reference [.test-policy, rules] robotframework: image: $ROBOT_PROJECT_IMAGE Loading @@ -346,12 +383,4 @@ robotframework: - rf_reports/robot-junit.xml when: always rules: # exclude tags - if: $CI_COMMIT_TAG when: never # on production and integration branch(es): auto (on_success) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # on other branch(es): manual & non-blocking if $REVIEW_ENABLED set - if: '$REVIEW_ENABLED == "true"' when: manual allow_failure: true - !reference [.acceptance-policy, rules] Loading
templates/gitlab-ci-robotframework.yml +47 −18 Original line number Diff line number Diff line Loading @@ -13,14 +13,56 @@ # program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth # Floor, Boston, MA 02110-1301, USA. # ========================================================================================= # default workflow rules # default workflow rules: Merge Request pipelines workflow: rules: # exclude merge requests - if: $CI_MERGE_REQUEST_ID # prevent branch pipeline when an MR is open (prefer MR pipeline) - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' when: never - when: always # test job prototype: implement adaptive pipeline rules .test-policy: rules: # on tag: auto & failing - if: $CI_COMMIT_TAG # on ADAPTIVE_PIPELINE_DISABLED: auto & failing - if: '$ADAPTIVE_PIPELINE_DISABLED == "true"' # on production or integration branch(es): auto & failing - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # early stage (dev branch, no MR): manual & non-failing - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null' when: manual allow_failure: true # Draft MR: auto & non-failing - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/' allow_failure: true # else (Ready MR): auto & failing - when: on_success # acceptance job prototype: implement adaptive pipeline rules .acceptance-policy: rules: # exclude tags - if: $CI_COMMIT_TAG when: never # on production or integration branch(es): auto & failing - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # disable if no review environment - if: '$REVIEW_ENABLED != "true"' when: never # on ADAPTIVE_PIPELINE_DISABLED: auto & failing - if: '$ADAPTIVE_PIPELINE_DISABLED == "true"' # early stage (dev branch, no MR): manual & non-failing - if: '$CI_MERGE_REQUEST_ID == null && $CI_OPEN_MERGE_REQUESTS == null' when: manual allow_failure: true # Draft MR: auto & non-failing - if: '$CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/' allow_failure: true # else (Ready MR): auto & failing - when: on_success variables: # variabilized tracking image TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master" Loading Loading @@ -322,12 +364,7 @@ robotframework-lint: # /!\ Work around '$ROBOT_PROJECT_IMAGE != "$ROBOT_BASE_IMAGE"' doesn't work - if: "$ROBOT_PROJECT_IMAGE !~ /ROBOT_BASE_IMAGE/" when: never # on production and integration branch(es): auto (on_success) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' allow_failure: true # on other branch(es): manual & non-blocking - when: manual allow_failure: true - !reference [.test-policy, rules] robotframework: image: $ROBOT_PROJECT_IMAGE Loading @@ -346,12 +383,4 @@ robotframework: - rf_reports/robot-junit.xml when: always rules: # exclude tags - if: $CI_COMMIT_TAG when: never # on production and integration branch(es): auto (on_success) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' # on other branch(es): manual & non-blocking if $REVIEW_ENABLED set - if: '$REVIEW_ENABLED == "true"' when: manual allow_failure: true - !reference [.acceptance-policy, rules]