-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (43 loc) · 1.27 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!groovy
pipeline {
agent {
docker {
image 'maven:3.5.0-jdk-8'
}
}
parameters {
string(name: 'APP_VERSION', description: 'Demo application version')
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '2'))
}
stages {
stage('Building'){
steps{
echo 'mvn package'
sh 'ls -la'
sh 'pwd'
sh 'which mvn'
}
}
stage('Publishing artifacts'){
steps{
echo 'docker push'
}
}
stage('Integration test'){
steps{
script {
echo 'Run image, prepare environment settings and run tests'
}
}
}
}
post {
changed {
echo "CloudBees job '${JOB_NAME}' build ${BUILD_DISPLAY_NAME} status has changed to: ${currentBuild.currentResult}! Please go to ${BUILD_URL} for details."
//mail(to: "[email protected]", subject: "CloudBees job '${JOB_NAME}' build ${BUILD_DISPLAY_NAME} status has changed to: ${currentBuild.currentResult}!", body: "Please go to ${BUILD_URL} for details.")
}
}
}