-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
61 lines (53 loc) · 1.22 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
image: dtg/puppet:16.04
variables:
LANG: "C.UTF-8"
LANGUAGE: "en_GB:en"
LC_ALL: "C.UTF-8"
stages:
- check
- test
- style
- integration
syntax:
stage: check
script:
- "find . -name '*.pp' | xargs puppet parser validate"
only:
- branches
base-apply:
stage: test
script:
- git submodule init -q
- git submodule update -q
- FACTER_hostname=default FACTER_fqdn=default.dtg.cl.cam.ac.uk puppet apply --noop --modulepath=modules --node_name_value=default.dtg.cl.cam.ac.uk manifests/nodes/
only:
- branches
lint-error:
stage: style
script:
- ./puppet-lint.py --err
only:
- branches
lint-doc:
stage: style
allow_failure: true
script:
- ./puppet-lint.py --doc
only:
- branches
shellcheck:
stage: style
script:
- find modules/{bayncore,dtg,exim,gpg,munin,nagios}/ -name '*.sh' -print0 | xargs -0 shellcheck
only:
- branches
apply-all:
stage: integration
script:
- git submodule init -q
- git submodule update -q
- apt-get update -qq
- FACTER_hostname=default FACTER_fqdn=default.dtg.cl.cam.ac.uk puppet apply --modulepath=modules --node_name_value=default.dtg.cl.cam.ac.uk manifests/nodes/
- ./test-all-puppet.py
only:
- branches