diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-05 19:31:35 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-06-05 19:31:35 +0300 |
commit | d2cc841c55d65bc8134bfb3a467e66c36ac32b0a (patch) | |
tree | f333b92c2c2623e7d2c3d0c4b785295f40c57cd8 /.gitlab/ci | |
parent | e7b6dace063fce593e6f9ac61390e7385a9868a1 (diff) |
Add yaml lint
This commit adds CI job that validates all `*.yml`
with `yamllint`.
This commit fixes all offenses present in repository.
Diffstat (limited to '.gitlab/ci')
-rw-r--r-- | .gitlab/ci/frontend.gitlab-ci.yml | 18 | ||||
-rw-r--r-- | .gitlab/ci/global.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/pages.gitlab-ci.yml | 1 | ||||
-rw-r--r-- | .gitlab/ci/qa.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 6 | ||||
-rw-r--r-- | .gitlab/ci/yaml.gitlab-ci.yml | 9 |
6 files changed, 23 insertions, 15 deletions
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index d62b24ae97d..8656ffdbb7f 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -38,11 +38,11 @@ gitlab:assets:compile: - bundle exec rake gitlab:assets:compile - time scripts/build_assets_image - scripts/clean-old-cached-assets - - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here + - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here # Play dependent manual jobs - install_api_client_dependencies_with_apt - - play_job "review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played - - play_job "schedule:review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played + - play_job "review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played + - play_job "schedule:review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played artifacts: name: webpack-report expire_in: 31d @@ -141,8 +141,8 @@ jest: extends: .dedicated-no-docs-and-no-qa-pull-cache-job <<: *use-pg dependencies: - - compile-assets - - setup-test-env + - compile-assets + - setup-test-env script: - scripts/gitaly-test-spawn - date @@ -154,8 +154,8 @@ jest: expire_in: 31d when: always paths: - - coverage-frontend/ - - junit_jest.xml + - coverage-frontend/ + - junit_jest.xml reports: junit: junit_jest.xml cache: @@ -220,7 +220,7 @@ lint:javascript:report: before_script: [] script: - date - - yarn run eslint-report || true # ignore exit code + - yarn run eslint-report || true # ignore exit code artifacts: name: eslint-report expire_in: 31d @@ -235,7 +235,7 @@ jsdoc: before_script: [] script: - date - - yarn run jsdoc || true # ignore exit code + - yarn run jsdoc || true # ignore exit code artifacts: name: jsdoc expire_in: 31d diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index cf87f5eb39c..aa25bad00e8 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -1,6 +1,6 @@ .dedicated-runner: retry: - max: 2 # This is confusing but this means "3 runs at max". + max: 2 # This is confusing but this means "3 runs at max". when: - unknown_failure - api_failure diff --git a/.gitlab/ci/pages.gitlab-ci.yml b/.gitlab/ci/pages.gitlab-ci.yml index 7d9136b8213..f7b18b809b4 100644 --- a/.gitlab/ci/pages.gitlab-ci.yml +++ b/.gitlab/ci/pages.gitlab-ci.yml @@ -1,4 +1,3 @@ - pages: extends: .dedicated-no-docs-no-db-pull-cache-job before_script: [] diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index 6b23af952e6..ee9e467886a 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -1,6 +1,6 @@ package-and-qa: image: ruby:2.6-alpine - stage: review # So even if review-deploy failed we can still run this + stage: review # So even if review-deploy failed we can still run this when: manual before_script: [] dependencies: [] diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 3f0c899d704..33e7b00784c 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -136,7 +136,7 @@ setup-test-env: stage: prepare script: - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - - scripts/gitaly-test-build # Do not use 'bundle exec' here + - scripts/gitaly-test-build # Do not use 'bundle exec' here artifacts: expire_in: 7d paths: @@ -342,8 +342,8 @@ coverage: name: coverage expire_in: 31d paths: - - coverage/index.html - - coverage/assets/ + - coverage/index.html + - coverage/assets/ except: - /(^docs[\/-].*|.*-docs$)/ - /(^qa[\/-].*|.*-qa$)/ diff --git a/.gitlab/ci/yaml.gitlab-ci.yml b/.gitlab/ci/yaml.gitlab-ci.yml new file mode 100644 index 00000000000..401318d2df2 --- /dev/null +++ b/.gitlab/ci/yaml.gitlab-ci.yml @@ -0,0 +1,9 @@ +# Yamllint of *.yml for .gitlab-ci.yml. +# This uses rules from project root `.yamllint`. +lint-ci-gitlab: + extends: .dedicated-runner + before_script: [] + dependencies: [] + image: sdesbure/yamllint:latest + script: + - yamllint .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates |