Skip to content

Commit

Permalink
Merge pull request #38 from CROSSINGTUD/ci/update-jenkins
Browse files Browse the repository at this point in the history
Update Jenkins
  • Loading branch information
schlichtig authored Oct 1, 2020
2 parents b06797d + 431b6be commit c143d39
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,29 @@ pipeline {
}
}
stage('Publish Snapshot'){
when {
branch 'develop';
}
steps {
withCredentials([usernamePassword(credentialsId: 'cognicrypt', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
sh '''
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] rm -rf /var/www/cognicrypt/snapshots
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] mkdir -p /var/www/cognicrypt/snapshots
sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* [email protected]:/var/www/cognicrypt/snapshots
'''
}
}
}
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 [email protected] rm -rf /var/www/cognicrypt/snapshot
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] mkdir -p /var/www/cognicrypt/snapshot
sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* [email protected]:/var/www/cognicrypt/snapshot
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] rm -rf /var/www/cognicrypt/stable
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] mkdir -p /var/www/cognicrypt/stable
sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* [email protected]:/var/www/cognicrypt/stable
'''
}
}
Expand Down

0 comments on commit c143d39

Please sign in to comment.