-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
51 lines (43 loc) · 1.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
sudo: required
dist: xenial
addons:
apt:
sources:
- chef-stable-xenial
packages:
- chefdk
# Don't `bundle install` which takes about 1.5 mins
install: echo "skip bundle install"
services: docker
before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(CHEF_LICENSE="accept" /opt/chefdk/bin/chef shell-init bash)" && CHEF_LICENSE="accept" chef gem install berkshelf --version '= 7.0.1'
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/chef gem search toml-rb
- /opt/chefdk/embedded/bin/chef gem install toml-rb --version '= 1.1.1'
script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
jobs:
include:
- stage: unittest
if: type = pull_request
script: /opt/chefdk/bin/chef exec rake
env: UNIT_AND_LINT=1
- stage: test-centos7-chef-12
if: type = pull_request
script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify default-centos-7
env: CHEF_VERSION=12.19.36
- stage: test-centos7-chef-15
if: type = pull_request
script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify default-centos-7
env: CHEF_VERSION=15.2.20
- stage: deploy
if: type = push AND branch = master
name: "deploy to supermarket"
script: ./upload.sh
stages:
- unittest
- test-centos7-chef-12
- test-centos7-chef-15
- deploy