Loading templates/validation.yml +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ do log_info "Validating: $file..." cilint_req="{\"content\": $(jq --raw-input --slurp '.' < "${file:-/dev/stdin}")}" cilint_resp=$(curl -s --header "Content-Type: application/json" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $CI_API_V4_URL/projects/$CI_PROJECT_ID/ci/lint --data "$cilint_req") cilint_resp=$(curl -s --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${GITLAB_TOKEN:-$GITLAB_CI_LINT_TOKEN}" $CI_API_V4_URL/projects/$CI_PROJECT_ID/ci/lint --data "$cilint_req") if [ "$(echo "$cilint_resp" | jq -r '.valid')" == "true" ] then log_info " ... valid" Loading Loading @@ -224,8 +224,8 @@ gitlab-ci-lint: script: - ci_lint rules: # enabled if $GITLAB_TOKEN and GITLAB_CI_FILES are set - if: '($GITLAB_TOKEN != null && $GITLAB_TOKEN != "") && $GITLAB_CI_FILES' # enabled if GITLAB_TOKEN or GITLAB_CI_LINT_TOKEN and GITLAB_CI_FILES are set - if: '($GITLAB_TOKEN || $GITLAB_CI_LINT_TOKEN) && $GITLAB_CI_FILES' check-links: extends: .gitlab-ci-base Loading Loading
templates/validation.yml +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ do log_info "Validating: $file..." cilint_req="{\"content\": $(jq --raw-input --slurp '.' < "${file:-/dev/stdin}")}" cilint_resp=$(curl -s --header "Content-Type: application/json" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $CI_API_V4_URL/projects/$CI_PROJECT_ID/ci/lint --data "$cilint_req") cilint_resp=$(curl -s --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${GITLAB_TOKEN:-$GITLAB_CI_LINT_TOKEN}" $CI_API_V4_URL/projects/$CI_PROJECT_ID/ci/lint --data "$cilint_req") if [ "$(echo "$cilint_resp" | jq -r '.valid')" == "true" ] then log_info " ... valid" Loading Loading @@ -224,8 +224,8 @@ gitlab-ci-lint: script: - ci_lint rules: # enabled if $GITLAB_TOKEN and GITLAB_CI_FILES are set - if: '($GITLAB_TOKEN != null && $GITLAB_TOKEN != "") && $GITLAB_CI_FILES' # enabled if GITLAB_TOKEN or GITLAB_CI_LINT_TOKEN and GITLAB_CI_FILES are set - if: '($GITLAB_TOKEN || $GITLAB_CI_LINT_TOKEN) && $GITLAB_CI_FILES' check-links: extends: .gitlab-ci-base Loading