From 12b0110be6cc568b2ed2533cd31afe46cc8d07c2 Mon Sep 17 00:00:00 2001 From: Stefan Krueger Date: Fri, 15 May 2020 19:44:11 +0200 Subject: [PATCH 1/2] Update jenkins file. Signed-off-by: Stefan Krueger --- Jenkinsfile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 63580324..64d77cc7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { } stage('Publish Snapshot'){ when { - branch 'master'; + branch 'develop'; } steps { withCredentials([usernamePassword(credentialsId: 'cognicrypt', usernameVariable: 'USER', passwordVariable: 'PASS')]) { @@ -25,5 +25,19 @@ pipeline { } } } + stage('Publish Release'){ + when { + branch 'master'; + } + steps { + withCredentials([usernamePassword(credentialsId: 'cognicrypt', usernameVariable: 'USER', passwordVariable: 'PASS')]) { + sh ''' + sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de rm -rf /var/www/cognicrypt/stable + sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de mkdir -p /var/www/cognicrypt/stable + sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* $USER@crossing.cdc.informatik.tu-darmstadt.de:/var/www/cognicrypt/stable + ''' + } + } + } } } From 431b6bed478e93685277e42010341e3f96314015 Mon Sep 17 00:00:00 2001 From: Stefan Krueger Date: Fri, 15 May 2020 20:26:33 +0200 Subject: [PATCH 2/2] Change folder name. Signed-off-by: Stefan Krueger --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 64d77cc7..997acdaa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,9 +18,9 @@ pipeline { steps { withCredentials([usernamePassword(credentialsId: 'cognicrypt', usernameVariable: 'USER', passwordVariable: 'PASS')]) { sh ''' - sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de rm -rf /var/www/cognicrypt/snapshot - sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de mkdir -p /var/www/cognicrypt/snapshot - sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* $USER@crossing.cdc.informatik.tu-darmstadt.de:/var/www/cognicrypt/snapshot + sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de rm -rf /var/www/cognicrypt/snapshots + sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no $USER@crossing.cdc.informatik.tu-darmstadt.de mkdir -p /var/www/cognicrypt/snapshots + sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* $USER@crossing.cdc.informatik.tu-darmstadt.de:/var/www/cognicrypt/snapshots ''' } }