jenkinsci / additional-identities-plugin

Additional Identities Plugin
https://plugins.jenkins.io/additional-identities-plugin
MIT License
4 stars 10 forks source link
jenkins jenkins-plugin user

Additional Identities Plugin for Jenkins

Build Status Coverage Version Changelog Installs

This plugin allows user to configure additional identities in jenkins user database for external services, typically SCM repositories.

Introduction

As SCM plugin parse changelog, they have to map SCM committers IDs with jenkins user database. This results in many cases in user duplication, until you exactly have the same ID in jenkins and SCM.

Jenkins 1.480 introduces an extension point to resolve jenkins user "canonical" ID when searching for user in Database by id or full name. This plugin uses this extension point to let user configure external identities as user properties.

Usage

On my Jenkins instance, I'm authenticated as "nicolas". As I want to use the same identity for commits on repositories, I can setup an additional identity for my account on googlecode : Configuration page

With this additional identity set, Jenkins will be able to match the committer id in svn "nicolas.deloof@gmail.com" with the jenkins user "nicolas", and link the builds I contributed to in my user view :

Matched user

Realms

As for HTTP authentication, a realm can be set to restrict an identity to a set of network resources (i.e. domain names in most cases). The realm attribute can be used to restrict the sources user ID matching will apply. In most cases, this is a substring of the SCM repository URL. If not set, additional identity applies to all user lookups, whatever the id source is.

This feature requires SCM plugins to be updated so that they compute host information form changelog and pass it to extension as REALM context attribute. Those plugins have been updated to support this advanced feature :

Tips

git plugin uses user name, as set in git commit, as committer ID, so you don't need an additional identity, just ensure your git client is configured with correct user name set :

git config --global user.name "Your Full Name Comes Here"

Changelog

See GitHub Releases for newer changes.

1.1 (Oct 20 2015)

1.0