Some stuff to help your pipelines
You can use vars/globals.groovy
. Add variable to globals.groovy
:
class globals {
final String FOO = "foo!"
}
Get global variable from pipeline or library with
@Field final String FOO = globals.FOO
stage('foo') {
echo FOO
}
You can use simple curl
wrapper vars/curl.groovy
for curl
`ing:
stage('curl it') {
curl url: "http://example.com", with_authentication: false
}