-
Notifications
You must be signed in to change notification settings - Fork 25
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
How to add ldapMappings from Jenkins #1060
Comments
Hi David, Thanks for reporting. I will have a look at the DSL v4 for However, for the setup of Ontrack, it may be more powerful and flexible to use "Configuration as Code". This way, most of the settings can be defined as a YAML file which is loaded by Ontrack (once or periodically, depending on your settings). I invite you to have a look at the following resource: https://static.nemerosa.net/ontrack/release/latest/docs/doc/index.html#casc Additionally, if you're using Helm/K8S to install Ontrack, the Casc setup is part of the settings and may even simplify your life further (see https://github.com/nemerosa/ontrack-chart) Waiting for your comments, I'll have a look at the DSL v4 failure above, but only when time allows. All the best, |
I have already been experimenting with CasC (setting the ONTRACK_CONFIG_CASC_LOCATIONS variable, etc), but that did not work yet. For now I have added the Basic config manual (Ldap and Git Config). I will have a closer look at that later. I would use CasC mostly for the static config. What I need is something that has immediate impact. I know this could perhaps be done by adding a CasC file and reloading the config (with GraphQL), but it is a bit strange that it worked for the other 2 tasks, but not fot this one. |
For the moment we are still using docker-compose for the deployment. Perhaps the move to Helm could ease the path to the CasC setup. |
Hi David, I had a quick look and in V4, the Documentation at https://github.com/nemerosa/ontrack/blob/master/ontrack-dsl-v4/src/main/groovy/net/nemerosa/ontrack/dsl/v4/Admin.groovy#L146 So your code should now look like: ontrack.admin.setGroupMapping("ldap", "", "jenkins_SPEEDBOAT", "ontrack_SPEEDBOAT") (the Tell me how this goes because I don't have test coverage on setting mappings for a LDAP authentication source. BR |
I tried that, but got following error:
|
Thanks @DavidCADanneels , I'll look into that as soon as I can. |
Available in 4.3.39 @DavidCADanneels , would that be possible for you to test with this version? Note that I've restored the
Please note that you need the version 4.1.2 of the Ontrack Jenkins plugin (it's released but mirrors may still synchronize still). |
Available in 4.4.1 |
In version 4.3.39 the latter command worked well, the first one did not. |
For the |
With plugin version 4.1.2 I retried
which failed with:
But no problem, I can still use the old syntax for now. |
Ok, it finally worked with:
using Ontrack 4.3.39, Plugin 4.1.2 and the Jenkins Syntax setting on V4 |
Hi Damien
I have set up a brand new (empty) Ontrack (version 4.3.19) and I'm trying to onboard new projects from a Jenkins job (as we did before)
I'm able create an accountGroup and an setAccountGroupProjectPermission for a project, with following code
But when try to add an ldapMapping with:
I get the following error:
How can we do this?
Do you have more detailed documentation about this topic?
Grtz,
David.
The text was updated successfully, but these errors were encountered: