User Tools

Site Tools


gitlab-ci.yml

Gitlab CI Docker Tools Config

Sitespeed.io Performance Test

Allow gitlab-runner to run docker containers in –privileged mode

Add privileged=true to gitlab-runners /etc/gitlab-runner/config.toml :

[[runners]]
  name = "docker"
  url = "http://gitlab.domain.org/"
  token = "XXXXXXXXXXXXXXXXXX"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = true # Make sure this is set to true and restart runner 'gitlab-runner restart'
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
  [runners.cache]

Configure Job

gitlab-ci.yml
stages:
  - performance
  - ...

variables:
  CI_ENVIRONMENT_URL: "https://www.knallimall.org"
  ...

performance:
  stage: performance
  image: docker:git
  services:
    - docker:dind
  variables:
    GIT_STRATEGY: none # Disable Git Repository Setup ... clone etc.
    GIT_CHECKOUT: "false" # Disable Git Checkout
  script:
    - export CI_ENVIRONMENT_URL=${CI_ENVIRONMENT_URL}
    - mkdir sitespeed-results
    - docker run --privileged --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io --outputFolder sitespeed-results $CI_ENVIRONMENT_URL -d 1 -n 1
  artifacts:
    name: "${CI_ENVIRONMENT_URL}_${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" # Name artifact file
    paths:
    - sitespeed-results/

Codeclimate Code Analysis

… blabla here …

Codeception thingies here

… blabla here …

gitlab-ci.yml.txt · Last modified: 2018/02/07 06:47 by admin