Groovy web console

subscribe to the feed Subscribe
to this
site

jenkins bug in shared lib

Published 1 month ago by bughuntrrr with tags bug jenkins sharedlib
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
// shared library vars/bugDemo.groovy
def call(String bots, String bits) {
    sh '''
        echo "${bots} should be 'aaaa' and ${bits} should be 'bbbb'"    # will print them wrong
    '''
}

// pipeline

environment {
    bits = 'aaaa'
    bots = 'bbbb'
}

...
bugDemo(bits, bots)