Commit 4ce7cd70 authored by Will Hall's avatar Will Hall Committed by Kamil Trzciński

Add yaml lint

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

This commit fixes all offenses present in repository.
parent da9c55c6
Pipeline #64796027 failed with stages
in 44 minutes and 47 seconds
......@@ -51,3 +51,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
......@@ -16,21 +16,21 @@ before_script:
- cd $GOPATH/src/$REPO_NAME
stages:
- test
- build
- deploy
- test
- build
- deploy
format:
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
- go test -race $(go list ./... | grep -v /vendor/)
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
- go test -race $(go list ./... | grep -v /vendor/)
compile:
stage: build
script:
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/mybinary
artifacts:
paths:
- mybinary
stage: build
script:
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/mybinary
artifacts:
paths:
- mybinary
......@@ -16,25 +16,25 @@ variables:
# We use SDKMan as tool for managing versions
before_script:
- apt-get update -qq && apt-get install -y -qq unzip
- curl -sSL https://get.sdkman.io | bash
- echo sdkman_auto_answer=true > /root/.sdkman/etc/config
- source /root/.sdkman/bin/sdkman-init.sh
- sdk install gradle $GRADLE_VERSION < /dev/null
- sdk use gradle $GRADLE_VERSION
# As it's not a good idea to version gradle.properties feel free to add your
# environments variable here
- echo grailsVersion=$GRAILS_VERSION > gradle.properties
- echo gradleWrapperVersion=2.14 >> gradle.properties
# refresh dependencies from your project
- ./gradlew --refresh-dependencies
# Be aware that if you are using Angular profile,
# Bower cannot be run as root if you don't allow it before.
# Feel free to remove next line if you are not using Bower
- echo {\"allow_root\":true} > /root/.bowerrc
- apt-get update -qq && apt-get install -y -qq unzip
- curl -sSL https://get.sdkman.io | bash
- echo sdkman_auto_answer=true > /root/.sdkman/etc/config
- source /root/.sdkman/bin/sdkman-init.sh
- sdk install gradle $GRADLE_VERSION < /dev/null
- sdk use gradle $GRADLE_VERSION
# As it's not a good idea to version gradle.properties feel free to add your
# environments variable here
- echo grailsVersion=$GRAILS_VERSION > gradle.properties
- echo gradleWrapperVersion=2.14 >> gradle.properties
# refresh dependencies from your project
- ./gradlew --refresh-dependencies
# Be aware that if you are using Angular profile,
# Bower cannot be run as root if you don't allow it before.
# Feel free to remove next line if you are not using Bower
- echo {\"allow_root\":true} > /root/.bowerrc
# This build job does the full grails pipeline
# (compile, test, integrationTest, war, assemble).
build:
script:
- ./gradlew build
script:
- ./gradlew build
......@@ -26,8 +26,8 @@ performance:
- mv sitespeed-results/data/performance.json performance.json
artifacts:
paths:
- performance.json
- sitespeed-results/
- performance.json
- sitespeed-results/
only:
refs:
- branches
......
......@@ -20,7 +20,7 @@
# want coverage results.
- julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("MyPackage"); Pkg.test("MyPackage"; coverage = true)'
# Comment out below if you do not want coverage results.
- julia -e 'using Pkg; Pkg.add("Coverage");
- julia -e 'using Pkg; Pkg.add("Coverage");
import MyPackage; cd(joinpath(dirname(pathof(MyPackage)), ".."));
using Coverage; cl, tl = get_summary(process_folder());
println("(", cl/tl*100, "%) covered")'
......@@ -55,17 +55,16 @@ pages:
image: julia:0.7
stage: deploy
script:
- apt-get update -qq && apt-get install -y git # needed by Documenter
- julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("MyPackage");' # rebuild Julia (can be put somewhere else I'm sure
- julia -e 'using Pkg; import MyPackage; Pkg.add("Documenter")' # install Documenter
- julia --color=yes docs/make.jl # make documentation
- mv docs/build public # move to the directory picked up by Gitlab pages
- apt-get update -qq && apt-get install -y git # needed by Documenter
- julia -e 'using Pkg; Pkg.clone(pwd()); Pkg.build("MyPackage");' # rebuild Julia (can be put somewhere else I'm sure
- julia -e 'using Pkg; import MyPackage; Pkg.add("Documenter")' # install Documenter
- julia --color=yes docs/make.jl # make documentation
- mv docs/build public # move to the directory picked up by Gitlab pages
artifacts:
paths:
- public
only:
- master
- master
# WARNING: This template is using the `julia` images from [Docker
# Hub][3]. One can use custom Julia images and/or the official ones found
......
......@@ -16,8 +16,8 @@ variables:
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- vendor/
- node_modules/
- vendor/
- node_modules/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
......@@ -37,7 +37,7 @@ before_script:
- docker-php-ext-enable xdebug
# Install Composer and project dependencies.
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- php composer.phar install
# Install Node dependencies.
# comment this out if you don't have a node dependency
- npm install
......@@ -63,10 +63,10 @@ before_script:
test:
script:
# run laravel tests
- php vendor/bin/phpunit --coverage-text --colors=never
# run frontend tests
# if you have any task for testing frontend
# set it in your package.json script
# comment this out if you don't have a frontend test
- npm test
# run laravel tests
- php vendor/bin/phpunit --coverage-text --colors=never
# run frontend tests
# if you have any task for testing frontend
# set it in your package.json script
# comment this out if you don't have a frontend test
- npm test
......@@ -14,14 +14,14 @@ services:
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
- node_modules/
test_async:
script:
- npm install
- node ./specs/start.js ./specs/async.spec.js
- npm install
- node ./specs/start.js ./specs/async.spec.js
test_db:
script:
- npm install
- node ./specs/start.js ./specs/db-postgres.spec.js
- npm install
- node ./specs/start.js ./specs/db-postgres.spec.js
image: ayufan/openshift-cli
stages:
- build # dummy stage to follow the template guidelines
- build # dummy stage to follow the template guidelines
- test
- deploy # dummy stage to follow the template guidelines
- deploy # dummy stage to follow the template guidelines
- review
- staging
- production
......
......@@ -4,19 +4,19 @@ image: php:7.1.1
# Select what we should cache between builds
cache:
paths:
- vendor/
- vendor/
before_script:
- apt-get update -yqq
- apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
# Install PHP extensions
- docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
# Install and run Composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- apt-get update -yqq
- apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
# Install PHP extensions
- docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
# Install and run Composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ce/ci/services/README.html for examples.
......@@ -33,4 +33,4 @@ variables:
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
test:
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
\ No newline at end of file
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
......@@ -4,12 +4,12 @@ image: node:4.2.2
pages:
cache:
paths:
- node_modules/
- node_modules/
script:
- npm install -g brunch
- brunch build --production
- npm install -g brunch
- brunch build --production
artifacts:
paths:
- public
- public
only:
- master
- master
......@@ -3,11 +3,11 @@ image: alpine
pages:
script:
- apk update && apk add doxygen
- doxygen doxygen/Doxyfile
- mv doxygen/documentation/html/ public/
- apk update && apk add doxygen
- doxygen doxygen/Doxyfile
- mv doxygen/documentation/html/ public/
artifacts:
paths:
- public
- public
only:
- master
- master
......@@ -4,14 +4,14 @@ image: node:latest
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
- node_modules/
pages:
script:
- yarn install
- ./node_modules/.bin/gatsby build --prefix-paths
- yarn install
- ./node_modules/.bin/gatsby build --prefix-paths
artifacts:
paths:
- public
- public
only:
- master
- master
......@@ -2,11 +2,11 @@
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
- public
only:
- master
- master
......@@ -4,12 +4,12 @@ image: node:4.2.2
pages:
cache:
paths:
- node_modules
- node_modules
script:
- npm install -g harp
- harp compile ./ public
- npm install -g harp
- harp compile ./ public
artifacts:
paths:
- public
- public
only:
- master
- master
......@@ -3,15 +3,15 @@ image: node:10.15.3
pages:
script:
- npm install hexo-cli -g
- test -e package.json && npm install
- hexo generate
- npm install hexo-cli -g
- test -e package.json && npm install
- hexo generate
artifacts:
paths:
- public
- public
cache:
paths:
- node_modules
key: project
only:
- master
- master
......@@ -3,15 +3,15 @@ image: dettmering/hugo-build
pages:
script:
- hugo
- hugo
artifacts:
paths:
- public
- public
only:
- master
- master
test:
script:
- hugo
- hugo
except:
- master
- master
......@@ -3,7 +3,7 @@ image: python:2.7
cache:
paths:
- vendor/
- vendor/
test:
stage: test
......@@ -20,6 +20,6 @@ pages:
- hyde gen -d public
artifacts:
paths:
- public
- public
only:
- master
......@@ -4,28 +4,28 @@
# JBake https://jbake.org/ is a Java based, open source, static site/blog generator for developers & designers
#