Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Latest commit

 

History

History
104 lines (77 loc) · 3.81 KB

setupPVTools.md

File metadata and controls

104 lines (77 loc) · 3.81 KB

setupPVTools

This step initializes the default tools always needed by our builds:

  • JDK
  • Maven

It uses the setupTools step from the pipeline library.

The versions of the initialized tools can be configured.

Table of contents

Defaults

When calling the step with defaults the following tools (configured in Jenkins) as initialized

  • sun-java8-jdk (Java SE Development Kit 8u66)
  • apache-maven3 (Apache Maven 3.3.9)

Examples

Example 1: Initialize defaults

setupPVTools()

Example 2: Initialize custom maven version

import static de.provision.devops.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*

setupPVTools(
    (TOOLS) : [
        (TOOL_MAVEN) : "custom-maven"
    ]
)

Example 3: Initialize custom JDK

import static de.provision.devops.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*

setupPVTools(
    (TOOLS) : [
        (TOOL_JDK) : "my-custom-jdk"
    ]
)

Configuration options

All configuration options must be inside the tools (ConfigConstants.TOOLS) map element to be evaluated and used by the step.

import static de.provision.devops.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*

setupPVTools(
    (TOOLS) : [
        (TOOL_MAVEN) : "...", // default is retrieved from PipelineConfiguration
        (TOOL_JDK) : "..." // default is retrieved from PipelineConfiguration
    ]
)

jdk

Constant ConfigConstants.TOOL_JDK
Type String
Default retrieved from PipelineConfiguration

Use this configuration option to specify the maven version you want to use.

💡 You can only specify maven installations here which are configured in the Jenkins instance!

maven

Constant ConfigConstants.TOOL_MAVEN
Type String
Default retrieved from PipelineConfiguration

💡 You can only specify JDK installations here which are configured in the Jenkins instance!

Related classes