-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
49 lines (43 loc) · 1.16 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
node("ios") {
timeout(45) {
ansiColor('xterm') {
env.LANG = "en_US.UTF-8"
env.RBENV_VERSION = env.RBENV_2_4
env.NSUnbufferedIO = "YES"
env.DEVELOPER_DIR = "/Applications/Xcode_8.3.app"
env.DANGER_BITBUCKETSERVER_HOST = "bitbucket.pgs-soft.com"
// Unlock Bitbucket Server credentials
withCredentials([usernamePassword(credentialsId: 'pgs-software-bitbucket-server-danger_user', passwordVariable: 'DANGER_BITBUCKETSERVER_PASSWORD', usernameVariable: 'DANGER_BITBUCKETSERVER_USERNAME')]) {
//
// Stages
// Prepare node
// - clean workspace
// - clone repository
// - update bundle
stage("Prepare & clone") {
deleteDir()
checkout scm
sh '''
# RBENV
eval "$(rbenv init -)"
# Bundler
bundle install
'''
}
// Danger
stage("Danger") {
sh '''
# RBENV
eval "$(rbenv init -)"
# Danger
bundle exec danger
'''
}
// Clean
stage("Clean") {
deleteDir()
}
}
}
}
}