forked from googleapis/google-auth-library-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
58 lines (49 loc) · 1.31 KB
/
Jenkinsfile
File metadata and controls
58 lines (49 loc) · 1.31 KB
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
#!groovy
@Library("liveramp-base@v1") _
pipeline {
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '50'))
ansiColor('xterm')
}
triggers {
// Github hook to build whenever a commit is pushed
githubPush()
// Github hook to build whenever 'jenkins please' is in a comment on github
issueCommentTrigger('.*jenkins\\W+(((test|build|run|do)\\W+this)|again|git\\W+r\\W+done|please|make it so).*')
}
agent any
environment {
RUBYGEMS_HOST = 'https://private-gems.liveramp.net'
}
stages {
stage('gem:ci') {
steps {
sh 'bundle install --path=.bundle-gems'
sh 'bundle exec rake ci'
}
}
stage('gem:release') {
when { branch 'master' }
steps {
withCredentials( bindings:
// CredentialsId was found through the credentials page for
// jenkins_publisher/****** (library.liveramp.net)
[
usernamePassword(
credentialsId: 'library.liveramp.net--jenkins_publisher',
usernameVariable: 'ARTIFACTORY_USERNAME',
passwordVariable: 'ARTIFACTORY_PASSWORD'
),
]) {
sh 'bundle exec rake ci_release'
}
}
}
}
post {
always {
slackNotification('#dev-ops-builds', 'master')
}
}
}