Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to make jenkins pipeline choose specific java version

pipeline {
        agent any

        stages {  
            stage ("first") {
                tools {
                   jdk "jdk-1.8.101"
                }
                steps {
                    sh 'java -version'
                }
            }
            stage("second"){
                tools {
                   jdk "jdk-1.8.152"
                }
                steps{
                    sh 'java -version'
                }
            }
       }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java file creation date 
Java :: enable cors on apache tomcat 
Java :: what is arraylist 
Java :: mettre caractère de string en majuscule java 
Java :: redshift establish connection jav gradle 
Java :: can a java class have more than 108 constructors 
Java :: Big decimal example 
Java :: Printing cube root of a number in java 
Java :: split string to textview in android 
Java :: width and height of screen java 
Java :: find the third largest number in an array 
Java :: t implements comparable 
Java :: put in spring rest api 
Java :: how to upload image from android app to server 
Java :: get week number from localdate java 
Java :: java loop through array 
Java :: android studio check if email is valid java 
Java :: LRU Cache java 
Java :: index 1 out of bound for length 1 java 
Java :: call by value and call by reference in java 
Java :: java 14 switch 
Java :: get value from Spring application.properties 
Java :: android click button programmatically 
Java :: java float data type 
Java :: static block in java 
Java :: run specific test case junit 
Java :: list of list in java 
Java :: interface declaration in java 
Java :: string comparison using == in java 
Java :: writeToFileAsync java 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =