Projet_JAVA_P2P_STRI2A/Jenkinsfile

31 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-03-10 17:34:07 +01:00
pipeline {
agent any
2020-03-10 17:32:05 +01:00
2020-03-10 17:34:07 +01:00
stages {
stage('build') {
steps {
2020-03-10 18:31:11 +01:00
sh 'javac -cp "./src" -d "./bin" $(find . -iname "*.java" -type f) -Xlint:deprecation -encoding UTF8'
2020-03-10 17:34:07 +01:00
sh 'echo "BUILDING CLIENT"'
sh 'echo Main-Class: clientP2P/ClientP2P > MANIFEST.MF'
2020-03-10 23:50:02 +01:00
sh 'jar -cvmf MANIFEST.MF client.jar $(find . \\( -iname "*.class" -and ! -iwholename "*/serverP2P/*.class" \\) -type f)'
2020-03-10 17:34:07 +01:00
sh 'echo "BUILDING SERVER"'
sh 'echo Main-Class: javaProjet2020/Server > MANIFEST.MF'
2020-03-10 23:50:02 +01:00
sh 'jar -cvmf MANIFEST.MF server.jar $(find . \\( -iname "*.class" -and ! -iwholename "*/clientP2P/*.class" \\) -type f)'
2020-03-10 17:34:07 +01:00
sh 'tar -zcvf sources.tar.gz src/'
}
}
stage('run') {
steps {
sh 'ls'
}
}
}
post {
success {
archiveArtifacts artifacts: 'client.jar', fingerprint: true
archiveArtifacts artifacts: 'server.jar', fingerprint: true
archiveArtifacts artifacts: 'sources.tar.gz', fingerprint: true
}
}
}