innaircbot/Jenkinsfile
2019-01-09 14:47:52 +03:00

33 lines
No EOL
864 B
Groovy

pipeline {
agent {
docker {
image 'maven:3-alpine'
args '-v /home/docker/jenkins/files/m2:/root/.m2 -v /home/docker/innaircbot/files/artifact:/rel'
}
}
stages {
stage('Build') {
steps {
sh 'mvn -B -DskipTests clean package'
}
}
stage('Test') {
steps {
echo 'Skip testing...'
}
}
stage('Deploy') {
steps {
// TODO: consider switch to docker registry
sh 'cp ./target/InnaIrcBot-*-jar-with-dependencies.jar /rel/InnaIrcBot.jar'
// sh 'docker restart innaircbot'
}
}
}
post {
always {
archiveArtifacts artifacts: 'target/*-jar-with-dependencies.jar', onlyIfSuccessful: true
}
}
}