-
Notifications
You must be signed in to change notification settings - Fork 154
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
[JENKINS-68755] Add support for explicit user and group assignment #230
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3b21c61
to
82ead83
Compare
add buttons move common javascript code to separate file.
move code parts that are more or less identical for global, item and agent assignment from the jelly to the tableAssign.js file
82ead83
to
9da3988
Compare
fix naming strategy ensure tooltip show if it is user or group
bbc4d7c
to
ed9a352
Compare
Required Configuration as Code plugin tests to be adapted: jenkinsci/configuration-as-code-plugin#2357 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding support to explicitly assign a role to a user or a group. This avoids confusion when a name matches both. A warning will be shown on the role assignment page for ambiguous entries with the possibility to make this a user or a group assignment.
❗ This is an incompatible change and after migration, going back to the previous version will require to undo the config changes. While the changes to the config.xml can be read by older versions, you can run into problems with duplicate entries.
Changes done on Configuration As Code yaml files need to be reverted to the old format before downgrading.
Config file changes
The new version can read an existing config.xml file. After startup of Jenkins with the new plugin version, the config.xml will be automatically saved with the new format. The new format basically just adds a new attribute to the sids
becomes (after applying user/group assignment via the UI)
(Without applying user/group it becomes
)
Configuration as Code changes
To read Configuration as code yaml files in the old format, please add the following to your casc yaml.
Without this addition startup will fail.
After starting Jenkins go to
Assign Roles
page and select for each entry in the table if the entry should be a user or a group.Once all entries are adjusted save the changes. You can then go to Configuration as Code and look at the new format.
If you want to manually change you yaml files replace all occurrences of
with
API Changes
The plugin APIs have significantly changed. Plugins that depend on role-strategy will probably need to be adjusted as well or might not work as expected (ownership-plugin, dynamic_extended_choice_parameter). Existing groovy scripts should be adjusted accordingly to avoid creating ambiguous entries.