-
Notifications
You must be signed in to change notification settings - Fork 10
/
Jenkinsfile
52 lines (46 loc) · 1.17 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
library(
identifier: '[email protected]',
retriever: modernSCM([
$class: 'GitSCMSource',
remote: '[email protected]:cloudops/cloudmc-jenkins-shared.git',
credentialsId: 'gh-jenkins'
])
)
def cloudcaProviderRepo = 'terraform-provider-cloudca'
def targetBranch = 'master'
def releaseTypeName
properties([
parameters([
choice(name: 'BUMP', description: 'Which part of the version {major}.{minor}.{patch} to increase?',
choices: [
'major',
'minor',
'patch'
].join('\n'))
])
])
pipeline {
agent {
label 'cmc && golang-1.7'
}
stages {
stage('Setup'){
steps {
script {
releaseTypeName = params.BUMP
sh 'git config user.name "jenkins"'
sh 'git config user.email "[email protected]"'
sh 'git checkout master'
sh 'git pull'
}
}
}
stage('Release') {
steps {
script {
sh "make ${releaseTypeName} push=true"
}
}
}
}
}