-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
36 lines (36 loc) · 955 Bytes
/
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
pipeline {
agent any
stages {
stage('build') {
steps {
script {
openshift.withCluster('aws1') {
openshift.withProject('shared') {
echo "Building on project ${openshift.project()}"
def build = openshift.selector("bc/fl-yo-test")
build.describe()
def buildconfig = build.startBuild()
timeout(5) { // Throw exception after 5 minutes
buildconfig.untilEach{
return (it.object().status.phase == "Complete")
}
}
}
}
}
}
}
stage('deploy') {
steps {
script {
openshift.withCluster('aws1') {
openshift.withProject('shared') {
def dc=openshift.selector("dc/fl-yo-test")
dc.rollout().latest()
}
}
}
}
}
}
}