Skip to content
Snippets Groups Projects
Commit 9c8ee1b2 authored by Andrew Newdigate's avatar Andrew Newdigate
Browse files

Merge branch 'add-links-to-help-to-all-ci-jobs' into 'main'

feat: include help documentation for all CI jobs

See merge request gitlab-com/gl-infra/common-ci-tasks!127
parents 6d9ea85a 9e455e1c
No related branches found
No related tags found
No related merge requests found
Pipeline #14977243 failed
Loading
Loading
@@ -23,6 +23,12 @@ validate_asdf_tool_versions:
- ./scripts/install-asdf-plugins.sh
- ./scripts/update-asdf-version-variables.sh
- git diff --exit-code
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the validate_asdf_tool_versions CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/asdf-tool-versions.md
EOD
rules:
# This script can be quite slow (mostly due to the ruby install)
# so we only run it when there have been changes
Loading
Loading
Loading
Loading
@@ -22,6 +22,12 @@ checkov:
echo "--------------------------------------------------------"
exit 1
}
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the checkov CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/checkov.md
EOD
artifacts:
when: always
reports:
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ editorconfig_check:
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on this CI job can be found at:
Need help? Documentation on the editorconfig_check CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/editorconfig-check.md
EOD
rules:
Loading
Loading
Loading
Loading
@@ -10,6 +10,12 @@ go_mod_tidy:
echo "For more information, visit https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/blob/main/go-mod-tidy.md"
exit 1;
}
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the go_mod_tidy CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/go-mod-tidy.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Loading
Loading
Loading
Loading
@@ -10,6 +10,12 @@ go_unittests:
else
echo "all packages excluded, skipping tests...";
fi
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the go_unittests CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/go-unittests.md
EOD
artifacts:
when: always
reports:
Loading
Loading
Loading
Loading
@@ -20,6 +20,12 @@ golangci_lint:
golangci-lint run --timeout 5m --out-format code-climate |
tee "gl-code-quality-report.json" |
jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the golangci_lint CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/golangci-lint.md
EOD
artifacts:
reports:
codequality: gl-code-quality-report.json
Loading
Loading
Loading
Loading
@@ -8,6 +8,12 @@ goreleaser_validate:
name: goreleaser/goreleaser:v${GL_ASDF_GORELEASER_VERSION}
entrypoint: [""]
script: goreleaser check
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the goreleaser_validate CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/goreleaser.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
exists:
Loading
Loading
@@ -44,7 +50,12 @@ goreleaser:
-e GITLAB_TOKEN -e CI_REGISTRY_IMAGE \
-e CI_SERVER_URL \
goreleaser/goreleaser:v${GL_ASDF_GORELEASER_VERSION} release --rm-dist
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the goreleaser CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/goreleaser.md
EOD
# Automatically retry on any system blips
retry:
max: 2
Loading
Loading
Loading
Loading
@@ -17,6 +17,12 @@
--destination $KANIKO_DESTINATION
$KANIKO_EXTRA_ARGS
--cache
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the kaniko_base CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/kaniko.md
EOD
cache:
key: ${CI_JOB_NAME}
paths:
Loading
Loading
Loading
Loading
@@ -23,6 +23,12 @@
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts;
fi
- if [[ -n "${GL_ASDF_LEGACY_VERSIONS_FILE}" ]]; then echo "legacy_version_file = yes" >> ~/.asdfrc; fi
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on this CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/renovate-bot.md
EOD
# Automatically retry on any system blips
retry:
max: 2
Loading
Loading
Loading
Loading
@@ -20,6 +20,12 @@ semantic_release:
semantic-release@^19
script:
- semantic-release
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the semantic_release CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/semantic-release.md
EOD
# Rules originally copied from runbooks project, but applicable to all
# semantic releases
rules:
Loading
Loading
Loading
Loading
@@ -12,6 +12,12 @@ shellcheck:
find . -type f \( -perm -u=x -not -name "*.sh" \) -not -path "*/.*/*" -print0 | xargs -0 grep -rIzlE '^#![[:blank:]]*(/usr/bin/env sh|/usr/bin/env bash|/bin/sh|/bin/bash)';
find . -type f -name "*.sh" -not -path "*/.*/*"
) | grep -vE "${COMMON_TASK_VALIDATIONS_EXCLUDES_REGEXP:-__ignored__}" | xargs shellcheck $SHELLCHECK_ARGS
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the shellcheck CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/shellcheck.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Loading
Loading
@@ -11,6 +11,12 @@ shfmt:
find . -type f \( -perm -u=x -not -name "*.sh" \) -not -path "*/.*/*" -print0 | xargs -0 grep -rIzlE '^#![[:blank:]]*(/usr/bin/env sh|/usr/bin/env bash|/bin/sh|/bin/bash)';
find . -type f -name "*.sh" -not -path "*/.*/*"
) | grep -vE "${COMMON_TASK_VALIDATIONS_EXCLUDES_REGEXP:-__ignored__}" | xargs shfmt -w -l -s -i 2 -d
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the shfmt CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/shfmt.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Loading
Loading
@@ -6,6 +6,12 @@ terraform_format:
entrypoint: [""]
script:
- terraform fmt -recursive -diff -check .
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the terraform_format CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/terraform-format.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Loading
Loading
@@ -14,6 +14,12 @@ terraform_validate:
done;
# tf-validate-failed indicates a linter failure
- if [ -f "${CI_PROJECT_DIR}/tf-validate-failed" ]; then exit 1; fi
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the terraform_validate CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/terraform-validate.md
EOD
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Loading
Loading
@@ -23,6 +23,12 @@ tflint:
done;
# tflint-reports/failed indicates a linter failure
- if [ -f "${CI_PROJECT_DIR}/tflint-reports/failed" ]; then exit 1; fi
after_script: |
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the tflint CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/tflint.md
EOD
artifacts:
when: always
reports:
Loading
Loading
Loading
Loading
@@ -8,9 +8,11 @@ yamllint:
- pip3 install yamllint
- yamllint -f parsable .
after_script: |
echo "----------------------------------------------------------"
echo "Need help? Documentation on this CI job can be found at:"
echo "https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/yamllint.md"
cat <<-EOD
----------------------------------------------------------
Need help? Documentation on the yamllint CI job can be found at:
https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/yamllint.md
EOD
rules:
- if: '($CI_PIPELINE_SOURCE == "merge_request_event") || ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH)'
exists:
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment