1pipeline {
2 agent any
3
4 stages {
5 stage ("first") {
6 tools {
7 jdk "jdk-1.8.101"
8 }
9 steps {
10 sh 'java -version'
11 }
12 }
13 stage("second"){
14 tools {
15 jdk "jdk-1.8.152"
16 }
17 steps{
18 sh 'java -version'
19 }
20 }
21 }
22}
23