Skip to content

Commit

Permalink
Add Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Jan 14, 2025
1 parent 6cc37d2 commit a9f37c4
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout(time: 10, unit: 'MINUTES')
timestamps() // Timestamper Plugin
disableConcurrentBuilds()
skipStagesAfterUnstable() // instead of currentBuild.currentResult == 'SUCCESS'
}
environment {
COMPANY = 'Puzzle ITC'
smile = '(:'
}
parameters {
string(name: 'smile', defaultValue: ':)', description: 'just smile')
}
// tools {
// jdk 'jdk11'
// maven 'maven36'
// }
stages {
stage('Info') {
steps {
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL} for ${env.COMPANY}"
echo "Smile params: ${params.smile} env: ${env.smile} no prefix: ${smile}"
}
}
stage('Build') {
steps {
sh 'mvn -Pdefault,deb -DskipTests clean package -Dsurefire.useFile=false -DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true"'
}
}
stage('Test') {
steps {
sh 'mvn test'
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
// stage('Human sanity check') {
// steps {
// input "Does everything look fine?"
// }
// }
stage('Deploy') {
steps {
echo 'Deploying..'
sh 'ls -asl'
}
}
}
post {
success {
echo 'Success'
}
failure {
echo 'Failure'
}
unstable {
echo 'Unstable'
}
changed {
echo 'Changed'
}
always {
echo 'Done'
deleteDir() // clean up our workspace
}
}
}

0 comments on commit a9f37c4

Please sign in to comment.