forked from CROSSINGTUD/CryptSL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
29 lines (27 loc) · 1016 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pipeline {
agent any
tools {
jdk 'Oracle JDK 8'
}
stages {
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Publish Snapshot'){
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
sshpass -p $PASS ssh -p 22022 -o StrictHostKeyChecking=no [email protected] mkdir -p /var/www/cognicrypt
sshpass -p $PASS scp -P 22022 -r de.darmstadt.tu.crossing.CrySL.repository/target/repository/* [email protected]:/var/www/cognicrypt
'''
}
}
}
}
}