Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 553 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 553 Bytes

jenkins-pipelines-helpers

Some stuff to help your pipelines

Global variables in libraries

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
}

curl wrapper

You can use simple curl wrapper vars/curl.groovy for curl`ing:

stage('curl it') {
    curl url: "http://example.com", with_authentication: false
}