-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
76 lines (70 loc) · 1.67 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# GitLab CI configuration - https://docs.gitlab.com/ce/ci/yaml/README.html
# r10k or similar.
variables:
GIT_STRATEGY: clone
PATH: /opt/puppetlabs/puppet/bin:/usr/bin:/usr/sbin:/bin:/sbin
stages:
- merge request
- checks
- impact
- promote
# Create WIP Merge request
# This script and the accept one require psick_profile::gitlab::cli included on the gitlab-runner node
# psick_profile::gitlab::cli::multirepo_config_hash must be set for the mentioned repos (psick-hieradata)
Create WIP MR:
stage: merge request
script:
- "/usr/local/bin/gitlab_multirepo_create_merge_request.rb psick-hieradata ${CI_BUILD_REF_NAME} production \"${CI_COMMIT_MESSAGE}\""
when: on_success
tags:
- deploy_puppet
except:
refs:
- production
- schedules
variables:
- $SKIP_MR == "yes"
allow_failure: true
# Run Syntax Checks on Feature/Personal Branch
Syntax checks:
stage: checks
script: "bin/yaml_check_syntax.sh"
tags:
- test_puppet
except:
- production
only:
- branches
Hidden chars check:
stage: checks
script: "bin/puppet_check_syntax_fast.sh chars"
cache:
untracked: true
paths:
- modules/
tags:
- test_puppet
except:
- production
only:
- branches
allow_failure: true
Accept MR:
stage: promote
script: "/usr/local/bin/gitlab_multirepo_accept_merge_request.rb psick-hieradata ${CI_BUILD_REF_NAME} production"
tags:
- deploy_puppet
when: on_success
only:
changes:
- "data/nodes/*.yaml"
- "data/role/*.yaml"
except:
refs:
- production
changes:
- "data/common.yaml"
- "data/zone/*.yaml"
- "bin/*"
variables:
- $SKIP_MR == "yes"