Provides additional generic tool installation methods
MIT License
Plugin provides following installers:
The following examples use the Custom Tools plugin to illustrate the new installation methods.
This example causes builds to fail if they require the "Very useful Linux tool" but are run on a node tagged with "windows".
Nodes tagged with "linux" put ${PATH_TO_THE_TOOL}
on the $PATH
and $LD_LIBRARY_PATH
before they continue on with the build.
This example defines a tool with two possible sources from which it can be downloaded.
https://some.unreliable.internal.server.com
,i.e. up to 12 download attempts in total (aabbaabbaabb)
This example uses the Check tool is already on PATH option to ensure that Git is already present on unix & linux machines at version 2.18 or later, but installs Git on Windows machines.
Note: Where an installation method for a Custom Tool definition (as shown earlier examples above) returns the directory containing the tool, the installation methods for a Git definition must return the location of the git client executable itself. That's why this example specifies a "Relative Path" of "git" (and a "Subdirectory of extracted archive" of "bin/git.exe").
Plugin can be configured using JCasC. Please find some example bellow.
They are using extra plugin generic-tool and ansible
tool:
maven:
installations:
- name: "maven-3.9.4"
properties:
- installSource:
installers:
- anyOf:
attemptsOfWholeList: 3
attemptsPerInstaller: 5
installers:
installers:
- authenticatedzip:
label: "linux"
subdir: "apache-maven-3.9.5"
url: "https://private.registry.company.org/maven/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz"
credentialsId: "private-registry-credentials-id"
- authenticatedzip:
label: "linux"
subdir: "apache-maven-3.9.5"
url: "https://archive.apache.org/dist/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz"
- stubInstaller:
failOnSubstitution: false
failTheBuild: true
label: "!linux"
message: "Unable to install on this node"
generic:
installations:
- name: "python3"
properties:
- installSource:
installers:
- findonpath:
executableName: "python3"
label: "built-in"
versionCmd:
- "python3 --version"
versionCmdString: "python3 --version"
versionMax: "3.12.0"
versionMin: "3.10.0"
versionPatternString: "Python (.*)"
ansible:
installations:
- name: "ansible"
properties:
- installSource:
installers:
- sharedDirectoryInstaller:
failOnSubstitution: true
label: "linux"
toolHome: "^${HOME}/.local/bin/ansible"