image: chef/chefdk:current

variables:
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay

services:
  - docker:dind

before_script:
  - eval "$(/opt/chefdk/bin/chef shell-init bash)"
  - /opt/chefdk/embedded/bin/chef --version
  - /opt/chefdk/embedded/bin/cookstyle --version
  - /opt/chefdk/embedded/bin/foodcritic --version
  # - apt-get update && apt-get install rsync -y
  # - apt-get update && apt-get install build-essential rsync -y
  # - git clone https://github.com/bdwyertech/kitchen-dokken.git && cd kitchen-dokken && git checkout bdwyertech-patch-1 && chef exec gem build kitchen-dokken.gemspec && chef exec gem install kitchen-dokken-2.1.2.gem && cd .. && rm -rf kitchen-dokken
  # - /opt/chefdk/embedded/bin/chef exec gem list kitchen-dokken -q

test:ChefDK:
  cache:
    paths:
      - .bundle
      - vendor/bundle
  script:
    - chef exec delivery local lint
    - chef exec delivery local syntax
    - chef exec delivery local unit
    # - KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify default -l debug || true
    # - sleep 100000
  tags:
    - chefdk

Add in a Gitlab test executor
Add in a Gitlab test executor
