if [ -n "${CI_COMMIT_TAG}" ]; then
# For tags, create a pipeline.
template=base
- fi
- if [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
+ elif [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
# For pipeline created by using a trigger token.
template=base
+ else
+ case "${CI_COMMIT_REF_NAME}" in
+ # For master, next, and maintenance branches, only check the defconfigs
+ (master|next|????.??.x)
+ template=check
+ ext=_check
+ ;;
+ # For the branch or tag name named *-defconfigs, create a pipeline.
+ (*-defconfigs)
+ template=base
+ ;;
+ (*-*_defconfig)
+ defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
+ template=base
+ ;;
+ esac
fi
- case "${CI_COMMIT_REF_NAME}" in
- # For master, next, and maintenance branches, only check the defconfigs
- (master|next|????.??.x)
- template=check
- ext=_check
- ;;
- # For the branch or tag name named *-defconfigs, create a pipeline.
- (*-defconfigs)
- template=base
- ;;
- (*-*_defconfig)
- defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
- template=base
- ;;
- esac
if [ -n "${template}" ]; then
for cfg in "${defconfigs[@]}"; do
if [ -n "${CI_COMMIT_TAG}" ]; then
# For tags, create a pipeline.
run_tests=true
- fi
- if [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
+ elif [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
# For pipeline created by using a trigger token.
run_tests=true
+ else
+ case "${CI_COMMIT_REF_NAME}" in
+ # For the branch or tag name named *-runtime-tests, create a pipeline.
+ (*-runtime-tests)
+ run_tests=true
+ ;;
+ (*-tests.*)
+ tests=( "${CI_COMMIT_REF_NAME##*-}" )
+ run_tests=true
+ ;;
+ esac
fi
- case "${CI_COMMIT_REF_NAME}" in
- # For the branch or tag name named *-runtime-tests, create a pipeline.
- (*-runtime-tests)
- run_tests=true
- ;;
- (*-tests.*)
- tests=( "${CI_COMMIT_REF_NAME##*-}" )
- run_tests=true
- ;;
- esac
if ${run_tests}; then
printf '%s: { extends: .runtime_test_base }\n' "${tests[@]}"