You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Projet_JAVA_P2P_STRI2A/Jenkinsfile

31 lines
1.1 KiB
Plaintext

5 years ago
pipeline {
agent any
5 years ago
stages {
stage('build') {
steps {
5 years ago
sh 'javac -cp "./src" -d "./bin" $(find . -iname "*.java" -type f) -Xlint:deprecation -encoding UTF8'
5 years ago
sh 'echo "BUILDING CLIENT"'
sh 'echo Main-Class: clientP2P/ClientP2P > MANIFEST.MF'
5 years ago
sh 'jar -cvmf MANIFEST.MF client.jar $(find . \\( -iname "*.class" -and ! -iwholename "*/clientP2P/*.class" \\) -type f)'
5 years ago
sh 'echo "BUILDING SERVER"'
sh 'echo Main-Class: javaProjet2020/Server > MANIFEST.MF'
5 years ago
sh 'jar -cvmf MANIFEST.MF server.jar $(find . \\( -iname "*.class" -and ! -iwholename "*/serverP2P/*.class" \\) -type f)'
5 years ago
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
}
}
}