|
|
4 ani în urmă | |
|---|---|---|
| .. | ||
| README.md | 5 ani în urmă | |
| assign-test.yml | 5 ani în urmă | |
| build.yml | 4 ani în urmă | |
| deploy.yml | 4 ani în urmă | |
| host-test.yml | 4 ani în urmă | |
| post_check.yml | 5 ani în urmă | |
| post_deploy.yml | 4 ani în urmă | |
| pre_check.yml | 5 ani în urmă | |
| rules.yml | 4 ani în urmă | |
| target-test.yml | 4 ani în urmă | |
rules.ymlrules.yml
rules.yml?Job?check if there's a suitable .rules:<rules-you-need> template
extends. All done, now you can close this window. (extends could be array or string)Rules Template?, create a suitable oneRules Template?check if there's a suitable .if-<if-anchor-you-need> anchor
if there is, create a rule following rules Template Naming Rules.For detail information, please refer to GitLab Documentation rules-if. Here's an example.
.rules:dev:
rules:
- <<: *if-trigger
- <<: *if-dev-push
if there isn't
if Anchor?, create a suitable oneif Anchor?Create an if anchor following if Anchors Naming Rules. For detail information about how to write the condition clause, please refer to GitLab Documentation `only/except (advanced). Here's an example.
.if-schedule: &if-schedule:
if: '$CI_PIPELINE_SOURCE == "schedule"'
if a phrase has multi words, use _ to concat them.
e.g.
regular_test
if a name have multi phrase, use - to concat them.
e.g.
regular_test-example_test
if Anchors Naming Rules.if-label-<label_name>.if-ref-<ref_name>.if-branch-<branch_name>.if-tag-<tag_name>.if-os-mac.if-ref-<release_name>-branch-<branch_name>no_label$BOT_TRIGGER_WITH_LABEL == null
protected($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)
target_testexample_test or custom_test or unit_test-all_targets
rules Template Naming Rules.rules:os:<os_name>.rules:tag:<tag_1>-<tag_2>if it's label related: .rules:labels:<label_1>-<label_2>
By default, all .rules:labels should include both if-label-regular_test and if-protected-no-label implicitly, unless they have special postfixes:
regular_test not includedif it's target test related: .rules:tests:<test_type_1>-<test_type_2>
By default, all .rules:tests should include if-protected-no_label implicitly, unless they have special postfixes (same as above)
if it needs to build at first, then do some target test: .rules:build_tests:<test_type_1>-<test_type_2>
By default, all .rules:build_tests should include if-protected-no-label, if-label-build, if-label-regular-test implictly, unless they have special postfixes (same as above)
if a job supports all targets, use -all_targets as postfix
tools/ci/utils.shIt is used to put all the reusable shell script as small functions. If you want to set before_script: [] for you job, now you can set extends: .before_script_slim instead. it will only run source tools/ci/utils.sh
If you're developing CI shell scripts, you can use these functions without source. They're already included in all before_script
To run these commands in shell script locally, place source tools/ci/utils.sh at the very beginning.
apply_bot_filteradd_gitlab_ssh_keysadd_github_ssh_keysadd_doc_server_ssh_keysfetch_submodulesget_all_submoduleserror: log in red colorwarning: log in orange colorinfo: log in green colorrun_cmd: run the command with duration seconds inforetry_failed: run the command with duration seconds info, retry when failed