tools {
com.cloudbees.jenkins.plugins.customtools.CustomTool "Ninja"
CustomTool "Ninja"
com.cloudbees.jenkins.plugins.customtools.CustomTool("Ninja")
CMake "CMake"
custom "Ninja"
Custom "Ninja"
msys2 "MSYS2"
}
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/e58a613f-2bba-4270-9888-5b8592f67e2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Same for the custom tools. Both custom tools and CMake work in the Scripted Pipeline job type but I can't get it to work in the Declarative Pipeline syntax.
environment {
GROOVY_HOME = tool name: 'Groovy-2.4.9', type: 'hudson.plugins.groovy.GroovyInstallation'
}
stages {
stage('Run Groovy') {
steps {
bat "${groovy_home}/bin/groovy <script.name>"
}
}
}
tool name: 'Groovy-2.4.9', type: 'hudson.plugins.groovy.GroovyInstallation'
tool name: 'bzip2', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool'
pipeline {
agent { label "windows" }
environment {
PATH = """${
[
tool('Ninja'),
[tool('CMake'), 'bin'].join(File.separator),
[tool('MSYS2'), 'mingw64', 'bin'].join(File.separator)
]
.join(File.pathSeparator) +
File.pathSeparator
}$PATH"""
}
stages {
stage("build") {
steps {
bat 'cmake -G Ninja .'
bat 'cmake --build .'
}
}
}
}