Files
CrossJeeves/Jenkinsfile
Flare Microsystems cb021e8453 Fix wildcard
2024-11-08 17:27:39 -08:00

34 lines
944 B
Groovy

pipeline {
agent any
stages {
stage('Compile'){
steps {
sh "mkdir -p bin"
sh "/tool/jdk1.6.0_45/bin/javac -target 1.5 -cp /tool/junit4/\* -d bin \$(find ./src/* | grep .java)"
}
}
stage('Test'){
steps {
sh '''
find bin/test -name "*.class" | sed \'s/bin\\///\' | sed \'s/\\.class//\' | tr \'/\' \'.\' | xargs -I {} java -cp ./bin:/tool/junit4/\\* org.junit.runner.JUnitCore {}
'''
}
}
stage('Package'){
steps {
dir("bin")
{
sh "/tool/jdk1.6.0_45/bin/jar cvfm ../CrossJeeves.jar ../manifest.txt ."
}
}
}
stage('Archive Artifacts')
{
when {triggeredBy 'UserIdCause'}
steps{
archiveArtifacts artifacts: 'CrossJeeves.jar'
}
}
}
}