Closed rpomeroy closed 7 years ago
I just saw this; sorry for the late response. That would be set up in the toolchains.json. You can learn more about that file by viewing the Specification for toolchains file in the wiki.
So let's say you have the YAML file in the root of the repository the YAML would look like:
language: java
jdk: oraclejdk8
There's more examples in the specification document.
For automating more than one toolchain within a build, it would be a list in the YAML file. It would create a Matrix job type according to this Job DSL script.
e.g.
language: java
jdk:
- oraclejdk7
- oraclejdk8
It assumes the toolchains exist on the agent already.
I wrote some additional documentation around this. See also:
In typical Jenkins 2.0 Pipeline builds a Jenkinsfile will reference a Java Tool by name. How does one automate the configuration of multiple Global Tool definitions like JDKs, Maven, Ant etc.?