Chef.gitlab-ci.yml 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9
# This file uses Test Kitchen with the kitchen-dokken driver to
# perform functional testing. Doing so requires that your runner be a
# Docker runner configured for privileged mode. Please see
# https://docs.gitlab.com/runner/executors/docker.html#use-docker-in-docker-with-privileged-mode
# for help configuring your runner properly, or, if you want to switch
# to a different driver, see http://kitchen.ci/docs/drivers

image: "chef/chefdk"
services:
10
  - docker:dind
11 12 13 14 15 16

variables:
  DOCKER_HOST: "tcp://docker:2375"
  KITCHEN_LOCAL_YAML: ".kitchen.dokken.yml"

stages:
17
  - build
18
  - lint
19
  - test
20
  - functional
21
  - deploy
22 23 24 25

foodcritic:
  stage: lint
  script:
Will Hall's avatar
Will Hall committed
26
    - chef exec foodcritic .
27 28 29 30

cookstyle:
  stage: lint
  script:
Will Hall's avatar
Will Hall committed
31
    - chef exec cookstyle .
32 33

chefspec:
34
  stage: test
35
  script:
Will Hall's avatar
Will Hall committed
36
    - chef exec rspec spec
37 38

# Set up your test matrix here. Example:
Will Hall's avatar
Will Hall committed
39 40 41 42 43 44 45
# verify-centos-6:
#   stage: functional
#   before_script:
#     - apt-get update
#     - apt-get -y install rsync
#   script:
#     - kitchen verify default-centos-6 --destroy=always
Matija Čupić's avatar
Matija Čupić committed
46
#
Will Hall's avatar
Will Hall committed
47 48 49 50 51 52 53
# verify-centos-7:
#   stage: functional
#   before_script:
#     - apt-get update
#     - apt-get -y install rsync
#   script:
#     - kitchen verify default-centos-7 --destroy=always