Re: Jenkinsfile Accessing variables from shared libraries

2020-12-16 Thread Adrian Wyssmann
I see several problem 1. using ' will not expand the parameters is your call should be sh "echo ${CustomMessage}" 2. CustomMessage is declared within the class Vars(), so you cannot access it You could implement a getter an then do something like this "echo ${globalVars.getCustomMe

Jenkinsfile Accessing variables from shared libraries

2020-12-16 Thread Kernel Panic
Hello there Maybe this is a very basic question, but am not being able to access a global variable from a shared library from a Jenkinsfile under vars I defined something like this globalVars.groovy class Vars () { def CustomMessage = "This is a new deployment" } from my Jenkinsfile libr

Better way to load all the plugins/dependencies for local java testing using jenkinsrule

2020-12-16 Thread Charles Moulliard
Hi As a java unit test will need jar files, it is then needed to load them nd to declare them within the pom.xml file or build.gradle file Example: testCompile("org.jenkins-ci.main:jenkins-test-harness:${jenkinsTestHarness}") testCompile("org.jenkins-ci.main:jenkins-war:${jenkinsCore}"

Re: Accessing Special Built-In Jenkins Variables List

2020-12-16 Thread Ven H
And other variables like ${NODE_NAME} are also not available through *env* global variables. Regards, Venkatesh On Wed, Dec 16, 2020 at 6:28 PM Ven H wrote: > Although, we can get it using the env.getEnvironment() array, but it > doesn't have ${WORKSPACE} variable. > > Regards, > Venkatesh > >

Blue Ocean Github enterprise token does not work

2020-12-16 Thread anilkumar panditi
Hi, I am creating a pipeline in blue ocean with github enterprise and when i enter the token and connect nothing is happening and i could not see anything in logs . I tried the work around from below , downgrading the GitHub API plugin version to 1.106 , but when downgraded its blue ocean githu

Re: Accessing Special Built-In Jenkins Variables List

2020-12-16 Thread Ven H
Although, we can get it using the env.getEnvironment() array, but it doesn't have ${WORKSPACE} variable. Regards, Venkatesh On Wed, Dec 16, 2020 at 6:16 PM Ven H wrote: > Hi, > > We have special Built-In Jenkins Variables for a Job like ${JOB_NAME}, > ${JOB_URL}, ${BUILD_NUMBER} etc, which can

Accessing Special Built-In Jenkins Variables List

2020-12-16 Thread Ven H
Hi, We have special Built-In Jenkins Variables for a Job like ${JOB_NAME}, ${JOB_URL}, ${BUILD_NUMBER} etc, which can be accessed inside a Pipeline script (both Scripted and Declarative). Although, we can use these variables directly, I would like to know whether these are a part of an Array varia