Hi guys,
I need to share some global state (Java objects) between 2 pipeline libraries.
vars/lib1.groovy:
def call(body)
{
// set some global state here
body()
}
vars/lib2.groovy:
def call()
{
// retrieve the global state here
}
And the Jenkinsfile:
Initially I thought about using "env" but it supports only String and I need to store a List<TestResult>.
Important: the global state needs to scoped to the job (i.e. another job using lib1() and lib2() shouldn't see the state value set).
Any idea?
Thanks a Lot