You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And this is one of my tests I'm doing adding in my tests:
//This test seems to not react properly to the changeRequest()
@Test
void "when all flags are false and not release branch but PR is open then my special method is invoked"()
{
def customEnv = ["COMPONENT_OWNER" : "Something", "COMPONENT_NAME" : "else", "VAR_3" : "Not compulsory"]
addParam("PARAM1", false, true)
addParam("PARAM2", false, true)
addEnvVar('CHANGE_BRANCH', 'develop')
addEnvVar('BRANCH_NAME', 'feature/blah')
addEnvVar('BUILD_NUMBER', '10')
myPipeline.call(customEnv)
assertEquals(false, myspecialmethodIsInvoked)
printCallStack()
assertJobStatusSuccess()
}
### Expected Results
I would expect that my "myspecialmethodIsInvoked" is executed only when the branch is not release and when there is not a PR, so in my case that I have a PR open, I would expect not to be executed but with the pipeline as it is, it is all the time executed because of the 3rd condition (I tested the other 2)
### Actual Results
I changed the code of the pipeline by:
not {
anyOf {
branch('release/**')
changeRequest()
}
}
and it seems to work as I was expected with the branch, but "changeRequest" seems to ignore the setting of the CHANGE_NAME
but it seems to ignore it.
Am I missing anything?
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
...
Reproduction steps
Hi guys,
I'm creating a pipeline that has a condition like that:
And this is one of my tests I'm doing adding in my tests:
but it seems to ignore it.
Am I missing anything?
Anything else?
No response
The text was updated successfully, but these errors were encountered: