From 78b0aee8abacc71db2dbddbec8966b09a60d75a9 Mon Sep 17 00:00:00 2001 From: Ajay Kumar Date: Mon, 25 Mar 2019 19:14:22 +0530 Subject: [PATCH] Add deploy stage --- Jenkinsfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2c0b4c8..7c3346b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,10 +23,13 @@ pipeline { stage ('Deployment Stage') { steps { - withMaven(maven : 'maven_3_5_0') { - sh 'mvn deploy' - } + + withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'PCF_LOGIN', +usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { + +sh 'cf login -a http://api.run.pivotal.io -u $USERNAME -p $PASSWORD' + } } } } -} \ No newline at end of file +}