-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
44 lines (37 loc) · 1.53 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
#!groovy
// Build and test a Maven project
// See https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md for pipeline syntax etc
//A CHANGE!!!
//ANOTHER CHANGE!!!
node('master') {
// A collection of build utils.
// See https://github.com/jenkinsci/workflow-remote-loader-plugin
// The github-oauth-userpass refers to the Jenkins credentials object.
def utils = fileLoader.fromGit('script/buildUtils', 'https://github.ibm.com/liber8/pipeline.git',
'master', 'github-oauth-userpass', 'master')
stage ('Extract') {
checkout scm
}
stage ('Build') {
utils.mavenBuild ('clean', 'package')
sh "docker build -t front-end:$BUILD_ID ."
}
// TODO: No tests currently defined for this service
// stage ('Test') {
// utils.mavenVerify()
//}
// TODO: Re-add push once we have a registry available as part of the pipeline
/* stage ('Push') {
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-oauth-userpass',
+ usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
+ sh '''
+ docker login wasliberty-liber8-docker.artifactory.swg-devops.com -u $USERNAME -p $PASSWORD
+ '''
+ }
sh "docker tag front-end:$BUILD_ID wasliberty-liber8-docker.artifactory.swg-devops.com/front-end:$BUILD_ID"
sh "docker push wasliberty-liber8-docker.artifactory.swg-devops.com/front-end:$BUILD_ID"
}*/
stage ('Deploy') {
utils.deploy ('a8.props', 'front-end')
}
}