forked from bcgov/gcpe-news-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-develop
34 lines (32 loc) · 935 Bytes
/
Jenkinsfile-develop
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
node('master') {
stage('Build Image') {
openshift.withCluster() {
openshift.withProject() {
echo "building..."
def bc = openshift.selector('bc', 'news-webapp-develop')
def buildSelector = bc.startBuild()
sleep(2)
buildSelector.logs('-f')
sleep(2)
openshift.tag("news-webapp-develop:latest", "news-webapp:dev")
openshift.tag("news-webapp-develop:latest", "news-webapp:test")
}
}
}
stage('Deploy on Dev') {
openshift.withCluster() {
openshift.withProject("47ba99-dev") {
echo "Deploying to dev..."
openshift.selector("dc", "news-webapp").rollout().latest()
}
}
}
stage('Deploy on Test') {
input "Deploy to test?"
openshift.withCluster() {
openshift.withProject("47ba99-test") {
openshift.selector("dc", "news-webapp").rollout().latest()
}
}
}
}