-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
41 lines (21 loc) · 766 Bytes
/
Copy pathJenkinsfile
File metadata and controls
41 lines (21 loc) · 766 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
#!/usr/bin/groovy
@Library('pipeline-library@master')
def canaryVersion = "1.0.${env.BUILD_NUMBER}"
def utils = new io.fabric8.Utils()
def test
mavenNode {
// Checkout code from repository
stage('Checkout source') {
checkout(scm).each { k,v -> env.setProperty(k, v) }
sh 'env | sort'
}
def branch = utils.getBranch();
def branchType = utils.getBranchType(branch)
def ns = utils.getKubernetesNamespaceFromBranchType(branchType)
def pr = utils.isPR()
def source = utils.getSourceBranch()
def target = utils.getTargetBranch()
echo "======> Building branch ${branch} of type ${branchType} for namespace ${ns}, is PR: ${pr}"
echo "Source: ${source}, Target: ${target}"
buildLibrary{}
}