-
Notifications
You must be signed in to change notification settings - Fork 183
/
Jenkinsfile
56 lines (54 loc) · 1.38 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Setup') {
steps {
sh "bin/jenkins_before.sh ${env.BRANCH_NAME}"
sh '/opt/puppetlabs/puppet/bin/bundle --path=vendor'
}
}
stage('Syntax') {
steps {
sh 'bin/puppet_check_syntax_fast.sh all_but_chars'
sh 'bin/puppet_lint.sh'
sh 'bin/puppet_check_syntax_fast.sh chars'
}
}
stage('Unit') {
steps {
sh 'bin/puppet_check_rake.sh site'
sh 'bin/puppet_check_rake.sh controlrepo'
}
}
stage('Diff') {
steps {
sh 'bin/puppet_ci.sh catalog_preview || true'
}
}
stage('Integration') {
steps {
sh 'bin/puppet_check_beaker.sh || true'
}
}
stage('Integration Rollout') {
when {
branch 'integration'
}
steps {
sh 'bin/puppet_ci.sh r10k_deploy --env integration --ssh jenkins@puppet --sudo'
sh 'bin/puppet_ci.sh task_run psick::puppet_agent --env integration'
sh 'bin/puppet_ci.sh db_query --env integration'
}
}
stage('Production Rollout') {
when {
branch 'production'
}
steps {
sh 'bin/puppet_ci.sh r10k_deploy --env production --ssh jenkins@puppet --sudo'
sh 'bin/puppet_ci.sh task_run psick::puppet_agent --env production'
sh 'bin/puppet_ci.sh db_query --env production'
}
}
}
}