-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credentials created by groovy script are overrided by credential injected by YAML config #351
Comments
Hi @gmarraffa, The sequence is set in the code: https://github.com/jenkinsci/kubernetes-operator/blob/master/pkg/controller/jenkins/configuration/user/reconcile.go#L80. The CasC plugin overrides all data so the fix will be to change the sequence to:
Would you like to contribute? Cheers |
Hi @tomaszsek , |
Hi guys,.stuck at a very similar situation. Is this request been done in the Jenkins-operator currently? |
What if we require a groovy script to run before CasC? |
I need to create some credentials by a groovy script since I need some dynamic logic to be executed and others by simply declaring them as YAML configuration, so in the configmap that handle the credentials I have 2 entries:
And in the jenkins defintion:
When the reconcile loop starts it executes at first the groovy script the successfully creates credential3 (checked by disabling the yaml config), but then it applies the YAML configuration that creates credential1 and credential2 and removes credential3.
I don't know if there is a way to force the script to be executed after the YAML config but I couldn't find it documented anywhere.
Right now I'm workarounding the issue by creating the credentials by script only.
Expected Behavior
After the reconcile loop is finished, credential1, credential2 and credential3 should be present in the system.
Actual Behavior
After the reconcile loop is finished only credential1 and credential2 are present in the system.
Additional Info
v0.4.0
The text was updated successfully, but these errors were encountered: