Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20182

Add API for easy getting of ownership info from Groovy scripts

      Such API will simplify usage of Ownership plugin for administration pruposes

          [JENKINS-20182] Add API for easy getting of ownership info from Groovy scripts

          Oleg Nenashev created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 151704 ] New: JNJira + In-Review [ 178040 ]

          Sorin Sbarnea added a comment -

          Somehow I am still unable to find any proof that there is way to get job ownership information from inside the pipeline.

          1. using environment variables: none of them is exposed. I tried this with multi-branch pipeline. JOB_COOWNERS JOB_COOWNERS_EMAILS JOB_OWNER JOB_OWNER_EMAIL
          2. the ownership variable is also undefined, see https://github.com/pycontribs/powertape/blob/master/vars/notifyBuild.groovy#L75 which is based on current documentation
          3.  There is no RecipientProvider exposed, thing being tracked as https://issues.jenkins-ci.org/browse/JENKINS-46790

          These being said, I am still looking for a way to obtain the owners emails from Groovy code. 

          olivergondza, maybe you know a trick for making this work on pipeline? If I cannot use owners email inside emailext this plugin looks like useless, we can rather use the description field to store owner info as well.

          Sorin Sbarnea added a comment - Somehow I am still unable to find any proof that there is way to get job ownership information from inside the pipeline. using environment variables: none of them is exposed. I tried this with multi-branch pipeline. JOB_COOWNERS JOB_COOWNERS_EMAILS JOB_OWNER JOB_OWNER_EMAIL the ownership variable is also undefined, see https://github.com/pycontribs/powertape/blob/master/vars/notifyBuild.groovy#L75  which is based on current documentation  There is no RecipientProvider exposed, thing being tracked as https://issues.jenkins-ci.org/browse/JENKINS-46790 These being said, I am still looking for a way to obtain the owners emails from Groovy code.  olivergondza , maybe you know a trick for making this work on pipeline? If I cannot use owners email inside emailext this plugin looks like useless, we can rather use the description field to store owner info as well.
          Sorin Sbarnea made changes -
          Link New: This issue relates to JENKINS-46790 [ JENKINS-46790 ]

          ssbarnea, can you please articulate the problem on higher level? What are you trying to achieve?

          Oliver Gondža added a comment - ssbarnea , can you please articulate the problem on higher level? What are you trying to achieve?

          Oleg Nenashev added a comment -

          "ownership" variable works well for me. If it is not available on your instance, I suggest creating a bug to the plugin and providing reproduction steps

          Oleg Nenashev added a comment - "ownership" variable works well for me. If it is not available on your instance, I suggest creating a bug to the plugin and providing reproduction steps
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Labels New: user-experience

            Unassigned Unassigned
            oleg_nenashev Oleg Nenashev
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: