File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -6,27 +6,35 @@ node('docker') {
66 mycontainer. inside(" -u jenkins -v /var/run/docker.sock:/var/run/docker.sock:rw" ) {
77 git ' https://github.com/elastest/elastest-cost-engine.git'
88
9- stage " Package"
10- echo (" Packaging" )
11- sh ' mvn package -DskipTests'
12-
139 stage " Tests"
1410 echo (" Starting tests" )
1511 sh ' mvn clean test'
1612 step([$class : ' JUnitResultArchiver' , testResults : ' **/target/surefire-reports/TEST-*.xml' ])
1713
14+ stage " Package"
15+ echo (" Packaging" )
16+ sh ' mvn package -DskipTests'
17+
1818 stage " Archive artifacts"
1919 archiveArtifacts artifacts : ' target/*.jar'
2020
2121 stage " Build image - Package"
22- echo (" Building" )
22+ echo (" Building Components" )
23+ def postgresimage = docker. build(" elastest/ece-postgres" , " ./postgres" )
24+ echo (" Building ECE Image" )
2325 def myimage = docker. build ' elastest/ece'
2426
2527 stage " Run image"
2628 myimage. run()
2729
2830 stage " Publish"
2931 echo (" Publishing" )
32+ withCredentials([[$class : ' UsernamePasswordMultiBinding' , credentialsId : ' elastestci-dockerhub' ,
33+ usernameVariable : ' USERNAME' , passwordVariable : ' PASSWORD' ]]) {
34+ sh ' docker login -u "$USERNAME" -p "$PASSWORD"'
35+ postgresimage. push()
36+ }
37+
3038 withCredentials([[$class : ' UsernamePasswordMultiBinding' , credentialsId : ' elastestci-dockerhub' ,
3139 usernameVariable : ' USERNAME' , passwordVariable : ' PASSWORD' ]]) {
3240 sh ' docker login -u "$USERNAME" -p "$PASSWORD"'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3'
22
33services :
44 postgres :
5- image : ecepostgres
5+ image : ece-postgres
66 ports :
77 - 5432:5432
88 environment :
You can’t perform that action at this time.
0 commit comments