-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
50 lines (47 loc) · 828 Bytes
/
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
46
47
48
49
50
//Scripted
//Declarative
pipeline {
agent any
environment {
dockerHome = tool 'mydocker'
mavenHome = tool 'mymaven'
PATH = '$dockerHome/bin:$mavenHome/bin:$PATH'
}
//agent {docker {image 'maven:3.6.3'}}
//agent {docker {image 'node:13.8'}}
stages {
stage('Build') {
steps {
sh "mvn --version"
sh "docker version"
echo "Build"
echo "$PATH"
echo "BUILD NUM = $env.BUILD_NUMBER"
echo "BUILD_ID=$env.BUILD_ID"
echo "BUILD_TAG=$env.BUILD_TAG"
//sh "node --version"
}
}
stage('Test') {
steps {
echo "Test"
}
}
stage('Integration Test') {
steps {
echo "Integration Test"
}
}
}
post {
always {
echo 'I run always'
}
success {
echo 'I run on success'
}
failure {
echo 'I run on failure'
}
}
}