forked from gnubila-france/puppet-redmine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
39 lines (32 loc) · 1023 Bytes
/
Jenkinsfile
File metadata and controls
39 lines (32 loc) · 1023 Bytes
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
node ('sl6') {
def workspace = pwd()
withEnv(["GEM_HOME=${workspace}", "PATH=${workspace}/bin:$PATH"]) {
try {
git poll:true, url: 'https://github.com/slconley/puppet-redmine.git'
stage 'Build Setup'
sh 'gem install bundler'
sh 'bundle install --deployment'
stage 'Lint'
sh 'bundle exec rake lint'
stage 'Validate'
sh 'bundle exec rake validate'
stage 'Spec'
sh 'bundle exec rake spec || true'
stage 'Build'
sh 'bundle exec rake build'
notifySuccessful()
} catch (err) {
currentBuild.result = 'FAILURE'
notifyFailed()
throw err
} // try
} // withEnv
} // node
def notifyStarted() { /* .. */ }
def notifySuccessful() {
//build job: 'DevOps-InfraAsCode/Puppet-Control/Control_test', wait: false
}
def notifyFailed() {
//step([$class: 'Mailer', recipients: 'gshepherd@solidyn.com'])
//slackSend (color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}