-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
41 lines (34 loc) · 1.04 KB
/
.gitlab-ci.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
# Template chef 20170731
image: sbernard/arch-kitchen-docker
before_script:
- bundle install
variables:
CHECKS_REPO: https://gitlab.com/samuel.bernard/checks/raw/master
foodcritic:
script:
- foodcritic -f any .
rubocop:
script:
- rubocop
lines_length:
script:
- curl -s $CHECKS_REPO/check_lines_length.sh | bash
git_history:
script:
- curl -s $CHECKS_REPO/check_git_history.sh | bash
kitchen:
tags:
- docker
before_script:
- bundle install
- if [ ! -e /var/run/docker.sock ]; then DOCKER_DRIVER=vfs dockerd & fi
# On shared runner running coreos, we need to add privileged in driver
# for centos and debian images. This may change in the future
- 'if uname -r | grep "coreos" > /dev/null; then
sed -i "/^driver:/a\\ \\ privileged: true" .kitchen.yml; fi'
script:
- >
alias kitchen='bundle exec kitchen';
imgs="$(kitchen diagnose | grep '^ image:' | cut -d':' -f2 | uniq)";
for image in $imgs; do docker pull $image; done
- bundle exec kitchen test -c -d always