Hi folks,
I am trying to do something which seems to be very simple, however somehow I am struggling to get it right.
Let's say I have a very simple job like this:
def job1 = job("job1") {
steps {
cmake {
buildToolStep {}
}
}
}
I want to define the previous job equivalently, first by defining a "job1" variable:
And then populating it with the build steps later on. Something like:
job1 {
steps {
cmake {
buildToolStep {}
}
}
}
Or maybe:
def jobClosure = {
steps {
cmake {
buildToolStep {}
}
}
}
// First try:
job1 { jobClosure }
// Second try:
job1 jobCloure
// Third try:
job1.call(jobClosure)
Unfortunately, I can't access job1.configureBlocks, because configureBlocks is private.
However, neither of the previous of my tries worked. It is very important, for my purposes / use case[1], to define the job first and only assign its configureBlocks later on.
How can I do that?
- Thiago