Projet_JAVA_P2P_STRI2A/Jenkinsfile

40 lines
1.6 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-12 10:18:48 +01:00
sh 'jar -cvmf MANIFEST.MF client.jar $(find bin/ -maxdepth 1 -mindepth 1 -printf "-C bin %f\n")'
2020-03-10 17:34:07 +01:00
sh 'echo "BUILDING SERVER"'
2020-03-12 10:18:48 +01:00
sh 'echo Main-Class: serverP2P/ServerP2P > MANIFEST.MF'
sh 'jar -cvmf MANIFEST.MF server.jar $(find bin/ -maxdepth 1 -mindepth 1 -printf "-C bin %f\n")'
sh 'echo "BUILDING TRACKER"'
sh 'echo Main-Class: tracker/Tracker > MANIFEST.MF'
sh 'jar -cvmf MANIFEST.MF tracker.jar $(find bin/ -maxdepth 1 -mindepth 1 -printf "-C bin %f\n")'
2020-04-03 14:33:24 +02:00
sh 'echo "BUILDING CLIENT GUI"'
sh 'echo Main-Class: gui/Gui > MANIFEST.MF'
sh 'jar -cvmf MANIFEST.MF clientGUI.jar $(find bin/ -maxdepth 1 -mindepth 1 -printf "-C bin %f\n")'
sh 'echo "CREATING sources.tar.gz"'
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: 'tracker.jar', fingerprint: true
2020-04-03 14:33:24 +02:00
archiveArtifacts artifacts: 'clientGUI.jar', fingerprint:true
2020-03-10 17:34:07 +01:00
archiveArtifacts artifacts: 'sources.tar.gz', fingerprint: true
}
}
}