From 7cc050a9022ec89c6292766629bc37711dcf3609 Mon Sep 17 00:00:00 2001 From: Benjamin Stein Date: Wed, 2 Aug 2017 11:54:12 -0700 Subject: [PATCH] adding pipeline for deploying to pivotal --- jenkinsfiles/pivotal | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 jenkinsfiles/pivotal diff --git a/jenkinsfiles/pivotal b/jenkinsfiles/pivotal new file mode 100644 index 000000000..33ba5411e --- /dev/null +++ b/jenkinsfiles/pivotal @@ -0,0 +1,32 @@ +pipeline { + agent none + stages { + stage('Build') { + agent { + docker { + image 'maven:3.5.0' + args '-e INITIAL_ADMIN_USER -e INITIAL_ADMIN_PASSWORD --network=${LDOP_NETWORK_NAME}' + } + } + steps { + configFileProvider( + [configFile(fileId: 'nexus', variable: 'MAVEN_SETTINGS')]) { + sh 'mvn -s $MAVEN_SETTINGS clean deploy -DskipTests=true -B' + } + } + } + stage('Deploy to Pivotal') { + agent { + docker { + image 'liatrio/cf-cli' + } + } + steps { + withCredentials([usernamePassword(credentialsId: 'pivotal', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]){ + sh "cf api https://api.run.pivotal.io && cf login -u ${env.USERNAME} -p ${env.PASSWORD}" + sh 'cf push' + } + } + } + } +}