From f2fef47e4a41d4f3a28168ecadb61cd2653d21c7 Mon Sep 17 00:00:00 2001 From: Mason Packard Date: Wed, 31 Aug 2016 16:55:01 -0400 Subject: [PATCH] Enhance pipeline cleanup and setup. --- Jenkinsfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index baac0af..40c52d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,10 +10,11 @@ if (BRANCH_TEST=="shibboleth-production"){ currentBuild.result = "SUCCESS" try { - stage 'Cleanup, Setup Path' + stage 'Cleanup & Setup' sh 'rm -rf output-*' sh 'rm -rf "/Users/levvel/VirtualBox VMs/"' - sh 'source /etc/profile' + sh 'rm /builds' + sh 'mkdir /builds' stage 'Checkout' @@ -35,6 +36,10 @@ if (BRANCH_TEST=="shibboleth-production"){ sh '/usr/local/bin/packer build shibboleth-appliance.json' + # stage 'Sync appliances to S3 bucket' + + # sh 'aws s3 sync /builds s3://internet2-appliance-us-west-1' + } catch (err) { @@ -50,10 +55,11 @@ if (BRANCH_TEST=="shibboleth-production"){ currentBuild.result = "SUCCESS" try { - stage 'Cleanup, Setup Path' + stage 'Cleanup & Setup ' sh 'rm -rf output-*' sh 'rm -rf "/Users/levvel/VirtualBox VMs"' - sh 'source /etc/profile' + sh 'rm /builds' + sh 'mkdir /builds' stage 'Checkout' @@ -71,10 +77,14 @@ if (BRANCH_TEST=="shibboleth-production"){ sh '/usr/local/bin/packer validate comange-appliance.json' - stage 'Build Appliance - Shibboleth' + stage 'Build Appliance - Comanage' sh '/usr/local/bin/packer build comanage-appliance.json' + # stage 'Sync appliances to S3 bucket' + + # sh 'aws s3 sync /builds s3://internet2-appliance-us-west-1' + } catch (err) {