Read about our upcoming Code of Conduct on this issue

Commit 1e5c1292 authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Rémy Coutable
Browse files

Add yaml lint

This commit adds CI job that validates all `*.yml`
with `yamllint`.

This commit fixes all offenses present in repository.
parent 6a6903d15c76
......@@ -44,3 +44,4 @@ include:
- local: .gitlab/ci/review.gitlab-ci.yml
- local: .gitlab/ci/setup.gitlab-ci.yml
- local: .gitlab/ci/test-metadata.gitlab-ci.yml
- local: .gitlab/ci/yaml.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
......
.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
......
pages:
extends: .dedicated-no-docs-no-db-pull-cache-job
before_script: []
......
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: []
......
......@@ -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$)/
# 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
# Documentation
- source: /doc/(.+?)\.md/ # doc/administration/build_artifacts.md
public: '\1.html' # doc/administration/build_artifacts.html
- source: /doc/(.+?)\.md/ # doc/administration/build_artifacts.md
public: '\1.html' # doc/administration/build_artifacts.html
---
extends: default
rules:
line-length: disable
document-start: disable
---
title: Fix yaml linting for GitLab CI inside project (.gitlab/ci) *.yml files and CI template files
merge_request: 27576
author: Will Hall
type: fixed
extends: default
rules:
line-length: disable
document-start: disable
......@@ -54,7 +54,7 @@ ensureContainer:
- rm -f android-signing-keystore.jks || true
artifacts:
paths:
- app/build/outputs
- app/build/outputs
buildDebug:
extends: .build_job
......@@ -116,6 +116,6 @@ promoteProduction:
# We only allow production promotion on `master` because
# it has its own production scoped secret variables
only:
- master
- master
script:
- bundle exec fastlane promote_beta_to_production
......@@ -6,7 +6,7 @@ image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.2"
ANDROID_SDK_TOOLS: "4333796"
ANDROID_SDK_TOOLS: "4333796"
before_script:
- apt-get --quiet update --yes
......@@ -35,7 +35,7 @@ assembleDebug:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
- app/build/outputs/
debugTests:
stage: test
......
......@@ -60,7 +60,7 @@ variables:
stages:
- build
- test
- deploy # dummy stage to follow the template guidelines
- deploy # dummy stage to follow the template guidelines
- review
- dast
- staging
......
......@@ -14,10 +14,10 @@ build:
artifacts:
paths:
- mybinary
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
# - "*.o"
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
# - "*.o"
# run tests using the binary built before
test:
......
......@@ -23,31 +23,31 @@ stages:
foodcritic:
stage: lint
script:
- chef exec foodcritic .
- chef exec foodcritic .
cookstyle:
stage: lint
script:
- chef exec cookstyle .
- chef exec cookstyle .
chefspec:
stage: test
script:
- chef exec rspec spec
- chef exec rspec spec
# Set up your test matrix here. Example:
#verify-centos-6:
# stage: functional
# before_script:
# - apt-get update
# - apt-get -y install rsync
# script:
# - kitchen verify default-centos-6 --destroy=always
# verify-centos-6:
# stage: functional
# before_script:
# - apt-get update
# - apt-get -y install rsync
# script:
# - kitchen verify default-centos-6 --destroy=always
#
#verify-centos-7:
# stage: functional
# before_script:
# - apt-get update
# - apt-get -y install rsync
# script:
# - kitchen verify default-centos-7 --destroy=always
# verify-centos-7:
# stage: functional
# before_script:
# - apt-get update
# - apt-get -y install rsync
# script:
# - kitchen verify default-centos-7 --destroy=always
......@@ -8,7 +8,7 @@ before_script:
# If you need to install any external applications, like a
# postgres client, you may want to uncomment the line below:
#
#- apt-get update -y
# - apt-get update -y
#
# Retrieve project dependencies
# Do this on before_script since it'll be shared between both test and
......@@ -17,6 +17,6 @@ before_script:
test:
script:
# If you need to run any migrations or configure the database, this
# would be the point to do it.
- lein test
# If you need to run any migrations or configure the database, this
# would be the point to do it.
- lein test
......@@ -22,15 +22,15 @@ cache:
# services such as redis or postgres
before_script:
- apt-get update -qq && apt-get install -y -qq libxml2-dev
- crystal -v # Print out Crystal version for debugging
- crystal -v # Print out Crystal version for debugging
- shards
# If you are using built-in Crystal Spec.
spec:
script:
- crystal spec
- crystal spec
# If you are using minitest.cr
minitest:
script:
- crystal test/spec_test.cr # change to the file(s) you execute for tests
- crystal test/spec_test.cr # change to the file(s) you execute for tests
......@@ -16,19 +16,19 @@ variables:
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- ~/.cache/pip/
- ~/.cache/pip/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- python -V # Print out python version for debugging
- python -V # Print out python version for debugging
# Uncomment next line if your Django app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
- pip install -r requirements.txt
# To get Django tests to work you may need to create a settings file using
# the following DATABASES:
#
#
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
......@@ -46,4 +46,4 @@ test:
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
script:
- python manage.py test
- python manage.py test
......@@ -15,4 +15,4 @@ before_script:
mix:
script:
- mix test
- mix test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment