Dear Colleagues,
Can you please suggest a way to use different credentials depending on the Git
branch in a multi-branch pipeline? In other words, I would like to have
pipeline {
environment {
CLIENT_ID = credentials('PROD_CLIENT_ID')
}
...
}
if the Git branch is "main" and
pipeline {
environment {
CLIENT_ID = credentials('DEV_CLIENT_ID')
}
...
}
if the Git branch is "dev", or even "*".
What would be the correct Groovy syntax to substitute "PROD_CLIENT_ID" or
"DEV_CLIENT_ID" depending on the branch name?
--
Victor Sudakov
Systems Administrator
Streamline - Property Management Software
Website: www.streamlinevrs.com
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/Y4ROJK3SmJsTTxhz%40vrs6.4vrs.com.