-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
35 lines (31 loc) · 1.08 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
stage 'Build'
node {
docker.image('cloudbees/java-build-tools:0.0.7.1').inside {
git 'https://github.com/CloudBees-community/MoviePlex-OpenShift-Example.git'
sh 'mvn clean package'
archive 'target/*.war,target/*.jar'
}
}
stage 'Deploy'
mail to: '[email protected]', \
subject: "${env.BUILD_TAG} ready to deploy", \
body: """Deploy ${env.BUILD_TAG}?
Goto ${env.BUILD_URL}."""
input message: 'Deploy?', ok: 'Deploy'
node {
docker.image('cloudbees/java-build-tools:0.0.7.1').inside {
//Requires CloudBees OpenShift CLI Plugin to
//automatically install OC client and log in to the server
wrap([$class: 'OpenShiftBuildWrapper',
url: 'https://openshift.beesshop.org:8443',
credentialsId: 'openshift-admin-aws',
insecure: true, //Don't check server certificate
]) {
// oc & source2image
sh """
oc project movieplex-application
oc start-build j2ee-application-build
"""
}
}
}