Add yaml lint

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

This commit fixes all offenses present in repository.
This commit is contained in:
Kamil Trzciński 2019-06-05 16:31:35 +00:00 committed by Rémy Coutable
parent e7b6dace06
commit d2cc841c55
54 changed files with 372 additions and 348 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,3 @@
pages:
extends: .dedicated-no-docs-no-db-pull-cache-job
before_script: []

View file

@ -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: []

View file

@ -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$)/

View file

@ -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

View file

@ -1,3 +1,3 @@
# 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

7
.yamllint Normal file
View file

@ -0,0 +1,7 @@
---
extends: default
rules:
line-length: disable
document-start: disable

View file

@ -0,0 +1,5 @@
---
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

View file

@ -0,0 +1,5 @@
extends: default
rules:
line-length: disable
document-start: disable

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -15,4 +15,4 @@ before_script:
mix:
script:
- mix test
- mix test

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,9 +1,9 @@
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

View file

@ -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
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -4,28 +4,28 @@
# JBake https://jbake.org/ is a Java based, open source, static site/blog generator for developers & designers
#
# This yml works with jBake 2.5.1
# Feel free to change JBAKE_VERSION version
# Feel free to change JBAKE_VERSION version
#
# HowTo at: https://jorge.aguilera.gitlab.io/howtojbake/
image: java:8
variables:
JBAKE_VERSION: 2.5.1
JBAKE_VERSION: 2.5.1
# We use SDKMan as tool for managing versions
before_script:
- apt-get update -qq && apt-get install -y -qq unzip zip
- 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 jbake $JBAKE_VERSION < /dev/null
- sdk use jbake $JBAKE_VERSION
- apt-get update -qq && apt-get install -y -qq unzip zip
- 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 jbake $JBAKE_VERSION < /dev/null
- sdk use jbake $JBAKE_VERSION
# This build job produced the output directory of your site
pages:
script:
- jbake . public
artifacts:
paths:
- public
script:
- jbake . public
artifacts:
paths:
- public

View file

@ -6,25 +6,24 @@ variables:
JEKYLL_ENV: production
before_script:
- bundle install
- bundle install
test:
stage: test
script:
- bundle exec jekyll build -d test
- bundle exec jekyll build -d test
artifacts:
paths:
- test
- test
except:
- master
- master
pages:
stage: deploy
script:
- bundle exec jekyll build -d public
- bundle exec jekyll build -d public
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -7,8 +7,8 @@ image: php:7.2
# These folders are cached between builds
cache:
paths:
- vendor/
- node_modules/
- vendor/
- node_modules/
before_script:
# Update packages
@ -28,10 +28,10 @@ before_script:
pages:
script:
- npm run production
- mv build_production public
- npm run production
- mv build_production public
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -3,10 +3,10 @@ image: python:2.7
pages:
script:
- pip install lektor
- lektor build --output-path public
- pip install lektor
- lektor build --output-path public
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -4,13 +4,13 @@ image: node:4.2.2
pages:
cache:
paths:
- node_modules/
- node_modules/
script:
- npm install -g metalsmith
- npm install
- make build
- npm install -g metalsmith
- npm install
- make build
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -3,25 +3,25 @@ image: ruby:2.3
cache:
paths:
- vendor
- vendor
test:
script:
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
- bundle exec middleman build
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
- bundle exec middleman build
except:
- master
pages:
script:
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
- bundle exec middleman build
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
- bundle exec middleman build
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -3,10 +3,10 @@ image: ruby:2.3
pages:
script:
- bundle install -j4
- nanoc
- bundle install -j4
- nanoc
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -3,13 +3,13 @@ image: ruby:2.3
pages:
script:
- apt-get update -qq && apt-get install -qq nodejs
- bundle install -j4
- bundle exec rake generate
- mv public .public
- mv .public/octopress public
- apt-get update -qq && apt-get install -qq nodejs
- bundle install -j4
- bundle exec rake generate
- mv public .public
- mv .public/octopress public
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -3,8 +3,8 @@ image: python:2.7-alpine
pages:
script:
- pip install -r requirements.txt
- pelican -s publishconf.py
- pip install -r requirements.txt
- pelican -s publishconf.py
artifacts:
paths:
- public/
- public/

View file

@ -18,34 +18,34 @@ cache:
- venv/
before_script:
- python -V # Print out python version for debugging
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
test:
script:
- python setup.py test
- pip install tox flake8 # you can also use tox
- tox -e py36,flake8
- python setup.py test
- pip install tox flake8 # you can also use tox
- tox -e py36,flake8
run:
script:
- python setup.py bdist_wheel
# an alternative approach is to install and run:
- pip install dist/*
# run the command here
- python setup.py bdist_wheel
# an alternative approach is to install and run:
- pip install dist/*
# run the command here
artifacts:
paths:
- dist/*.whl
- dist/*.whl
pages:
script:
- pip install sphinx sphinx-rtd-theme
- cd doc ; make html
- mv build/html/ ../public/
- pip install sphinx sphinx-rtd-theme
- cd doc ; make html
- mv build/html/ ../public/
artifacts:
paths:
- public
- public
only:
- master
- master

View file

@ -21,7 +21,7 @@ cache:
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- ruby -v # Print out ruby version for debugging
- ruby -v # Print out ruby version for debugging
# Uncomment next line if your rails app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
@ -29,19 +29,19 @@ before_script:
# Optional - Delete if not using `rubocop`
rubocop:
script:
- rubocop
- rubocop
rspec:
script:
- rspec spec
- rspec spec
rails:
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
script:
- rails db:migrate
- rails db:seed
- rails test
- rails db:migrate
- rails db:seed
- rails test
# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk
# are supported too: https://github.com/travis-ci/dpl
@ -49,5 +49,5 @@ deploy:
type: deploy
environment: production
script:
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY

View file

@ -5,19 +5,19 @@ image: "rust:latest"
# Optional: Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
#services:
# - mysql:latest
# - redis:latest
# - postgres:latest
# services:
# - mysql:latest
# - redis:latest
# - postgres:latest
# Optional: Install a C compiler, cmake and git into the container.
# You will often need this when you (or any of your dependencies) depends on C code.
#before_script:
#- apt-get update -yqq
#- apt-get install -yqq --no-install-recommends build-essential
# before_script:
# - apt-get update -yqq
# - apt-get install -yqq --no-install-recommends build-essential
# Use cargo to test the project
test:cargo:
script:
- rustc --version && cargo --version # Print version info for debugging
- cargo test --all --verbose
- rustc --version && cargo --version # Print version info for debugging
- cargo test --all --verbose

View file

@ -15,22 +15,22 @@ dast:
image:
name: "registry.gitlab.com/gitlab-org/security-products/dast:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable"
variables:
# URL to scan:
# DAST_WEBSITE: https://example.com/
#
# Time limit for target availability (scan is attempted even when timeout):
# DAST_TARGET_AVAILABILITY_TIMEOUT: 60
#
# Set these variables to scan with an authenticated user:
# DAST_AUTH_URL: https://example.com/sign-in
# DAST_USERNAME: john.doe@example.com
# DAST_PASSWORD: john-doe-password
# DAST_USERNAME_FIELD: session[user] # the name of username field at the sign-in HTML form
# DAST_PASSWORD_FIELD: session[password] # the name of password field at the sign-in HTML form
# DAST_AUTH_EXCLUDE_URLS: http://example.com/sign-out,http://example.com/sign-out-2 # optional: URLs to skip during the authenticated scan; comma-separated, no spaces in between
#
# Perform ZAP Full Scan, which includes both passive and active scanning:
# DAST_FULL_SCAN_ENABLED: "true"
# URL to scan:
# DAST_WEBSITE: https://example.com/
#
# Time limit for target availability (scan is attempted even when timeout):
# DAST_TARGET_AVAILABILITY_TIMEOUT: 60
#
# Set these variables to scan with an authenticated user:
# DAST_AUTH_URL: https://example.com/sign-in
# DAST_USERNAME: john.doe@example.com
# DAST_PASSWORD: john-doe-password
# DAST_USERNAME_FIELD: session[user] # the name of username field at the sign-in HTML form
# DAST_PASSWORD_FIELD: session[password] # the name of password field at the sign-in HTML form
# DAST_AUTH_EXCLUDE_URLS: http://example.com/sign-out,http://example.com/sign-out-2 # optional: URLs to skip during the authenticated scan; comma-separated, no spaces in between
#
# Perform ZAP Full Scan, which includes both passive and active scanning:
# DAST_FULL_SCAN_ENABLED: "true"
allow_failure: true
script:
- export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}

View file

@ -1,7 +1,7 @@
# Read more about this feature here: https://docs.gitlab.com/ee/user/project/merge_requests/license_management.html
variables:
LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager.
LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager.
license_management:
stage: test

View file

@ -25,7 +25,7 @@ archive_project:
- master
artifacts:
paths:
- build/ProjectName.ipa
- build/ProjectName.ipa
tags:
- ios_11-3
- xcode_9-3

View file

@ -1,4 +1,5 @@
# This is a simple example illustrating how to build and test .NET Core project
---
# This is a simple example illustrating how to build and test .NET Core project
# with GitLab Continuous Integration / Continuous Delivery.
# ### Specify the Docker image
@ -17,21 +18,21 @@ image: microsoft/dotnet:latest
# ### Define variables
#
variables:
# 1) Name of directory where restore and build objects are stored.
OBJECTS_DIRECTORY: 'obj'
# 2) Name of directory used for keeping restored dependencies.
NUGET_PACKAGES_DIRECTORY: '.nuget'
# 3) A relative path to the source code from project repository root.
# NOTE: Please edit this path so it matches the structure of your project!
SOURCE_CODE_PATH: '*/*/'
# 1) Name of directory where restore and build objects are stored.
OBJECTS_DIRECTORY: 'obj'
# 2) Name of directory used for keeping restored dependencies.
NUGET_PACKAGES_DIRECTORY: '.nuget'
# 3) A relative path to the source code from project repository root.
# NOTE: Please edit this path so it matches the structure of your project!
SOURCE_CODE_PATH: '*/*/'
# ### Define stage list
#
# In this example there are only two stages.
# Initially, the project will be built and then tested.
stages:
- build
- test
- build
- test
# ### Define global cache rule
#
@ -50,31 +51,31 @@ stages:
# With global cache rule, cached dependencies will be downloaded before every job
# and then unpacked to the paths as specified below.
cache:
# Per-stage and per-branch caching.
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths:
# Specify three paths that should be cached:
# Per-stage and per-branch caching.
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths:
# Specify three paths that should be cached:
#
# 1) Main JSON file holding information about package dependency tree, packages versions,
# frameworks etc. It also holds information where to the dependencies were restored.
- '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json'
# 2) Other NuGet and MSBuild related files. Also needed.
- '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*'
# 3) Path to the directory where restored dependencies are kept.
- '$NUGET_PACKAGES_DIRECTORY'
#
# 1) Main JSON file holding information about package dependency tree, packages versions,
# frameworks etc. It also holds information where to the dependencies were restored.
- '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json'
# 2) Other NuGet and MSBuild related files. Also needed.
- '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*'
# 3) Path to the directory where restored dependencies are kept.
- '$NUGET_PACKAGES_DIRECTORY'
#
# 'pull-push' policy means that latest cache will be downloaded (if it exists)
# before executing the job, and a newer version will be uploaded afterwards.
# Such a setting saves time when there are no changes in referenced third-party
# packages.
#
# For example, if you run a pipeline with changes in your code,
# but with no changes within third-party packages which your project is using,
# then project restore will happen quickly as all required dependencies
# will already be there — unzipped from cache.
# 'pull-push' policy means that latest cache will be downloaded (if it exists)
# before executing the job, and a newer version will be uploaded afterwards.
# Such a setting saves time when there are no changes in referenced third-party
# packages.
#
# For example, if you run a pipeline with changes in your code,
# but with no changes within third-party packages which your project is using,
# then project restore will happen quickly as all required dependencies
# will already be there — unzipped from cache.
# 'pull-push' policy is the default cache policy, you do not have to specify it explicitly.
policy: pull-push
# 'pull-push' policy is the default cache policy, you do not have to specify it explicitly.
policy: pull-push
# ### Restore project dependencies
#
@ -87,30 +88,30 @@ cache:
#
# Learn more about GitLab cache: https://docs.gitlab.com/ee/ci/caching/index.html
before_script:
- 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY'
- 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY'
build:
stage: build
# ### Build all projects discovered from solution file.
#
# Note: this will fail if you have any projects in your solution that are not
# .NET Core-based projects (e.g. WCF service), which is based on .NET Framework,
# not .NET Core. In this scenario, you will need to build every .NET Core-based
# project by explicitly specifying a relative path to the directory
# where it is located (e.g. 'dotnet build ./src/ConsoleApp').
# Only one project path can be passed as a parameter to 'dotnet build' command.
script:
- 'dotnet build --no-restore'
stage: build
# ### Build all projects discovered from solution file.
#
# Note: this will fail if you have any projects in your solution that are not
# .NET Core-based projects (e.g. WCF service), which is based on .NET Framework,
# not .NET Core. In this scenario, you will need to build every .NET Core-based
# project by explicitly specifying a relative path to the directory
# where it is located (e.g. 'dotnet build ./src/ConsoleApp').
# Only one project path can be passed as a parameter to 'dotnet build' command.
script:
- 'dotnet build --no-restore'
tests:
stage: test
# ### Run the tests
#
# You can either run tests for all test projects that are defined in your solution
# with 'dotnet test' or run tests only for specific project by specifying
# a relative path to the directory where it is located (e.g. 'dotnet test ./test/UnitTests').
#
# You may want to define separate testing jobs for different types of testing
# (e.g. integration tests, unit tests etc).
script:
- 'dotnet test --no-restore'
stage: test
# ### Run the tests
#
# You can either run tests for all test projects that are defined in your solution
# with 'dotnet test' or run tests only for specific project by specifying
# a relative path to the directory where it is located (e.g. 'dotnet test ./test/UnitTests').
#
# You may want to define separate testing jobs for different types of testing
# (e.g. integration tests, unit tests etc).
script:
- 'dotnet test --no-restore'

View file

@ -3,12 +3,12 @@
# (located in gitlab-runner.exe directory):
# shell = "powershell"
#
# The script is composed of 3 stages: build, test and deploy.
# The script is composed of 3 stages: build, test and deploy.
#
# The build stage restores NuGet packages and uses msbuild to build the exe and msi
# One major issue you'll find is that you can't build msi projects from command line
# if you use vdproj. There are workarounds building msi via devenv, but they rarely work
# The best solution is migrating your vdproj projects to WiX, as it can be build directly
# The best solution is migrating your vdproj projects to WiX, as it can be build directly
# by msbuild.
#
# The test stage runs nunit from command line against Test project inside your solution
@ -38,28 +38,28 @@ stages:
build_job:
stage: build
only:
- tags # the build process will only be started by git tag commits
- tags # the build process will only be started by git tag commits
script:
- '& "$env:NUGET_PATH" restore' # restore Nuget dependencies
- '& "$env:MSBUILD_PATH" /p:Configuration=Release' # build the project
- '& "$env:NUGET_PATH" restore' # restore Nuget dependencies
- '& "$env:MSBUILD_PATH" /p:Configuration=Release' # build the project
artifacts:
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
paths:
- '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
- '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
- '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
- '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder
- '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder
- '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
test_job:
stage: test
only:
- tags
script:
- '& "$env:NUNIT_PATH" ".\$env:TEST_FOLDER\Tests.dll"' # running NUnit tests
- '& "$env:NUNIT_PATH" ".\$env:TEST_FOLDER\Tests.dll"' # running NUnit tests
artifacts:
when: always # save test results even when the task fails
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
when: always # save test results even when the task fails
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
paths:
- '.\TestResult.xml' # saving NUnit results to copy to deploy folder
- '.\TestResult.xml' # saving NUnit results to copy to deploy folder
dependencies:
- build_job
@ -79,7 +79,6 @@ deploy_job:
- 'xcopy /y ".\$env:EXE_RELEASE_FOLDER\YourApp.exe" "$deployFolder"'
- 'xcopy /y ".\$env:MSI_RELEASE_FOLDER\YourApp Setup.msi" "$deployFolder"'
- 'xcopy /y ".\TestResult.xml" "$deployFolder"'
dependencies:
- build_job
- test_job

View file

@ -1,13 +1,13 @@
# This is a very simple template that mainly relies on FastLane to build and distribute your app.
# Read more about how to use this template on the blog post https://about.gitlab.com/2019/03/06/ios-publishing-with-gitlab-and-fastlane/
# You will also need fastlane and signing configuration for this to work, along with a MacOS runner.
# You will also need fastlane and signing configuration for this to work, along with a MacOS runner.
# These details are provided in the blog post.
# Note that when you're using the shell executor for MacOS builds, the
# build and tests run as the identity of the runner logged in user, directly on
# the build host. This is less secure than using container executors, so please
# take a look at our security implications documentation at
# https://docs.gitlab.com/runner/security/#usage-of-shell-executor for additional
# take a look at our security implications documentation at
# https://docs.gitlab.com/runner/security/#usage-of-shell-executor for additional
# detail on what to keep in mind in this scenario.
stages:
@ -27,4 +27,4 @@ build:
- bundle exec fastlane build
artifacts:
paths:
- ./*.ipa
- ./*.ipa