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

Authorize Project plugin not working for pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Windows Server 2012 R2

      When I run a pipeline build with the Authorization set to either "Run as User who Triggered Build" or "Run as Specific User", the commands still execute as the account my Jenkins service is running as (hps\svcBuildAdmin).  The below script demonstrates the problem

      pipeline {    
         agent any    
         stages {     
            stage ('Check User') {            
               steps {     
                  bat "whoami"            
               }     
            }    
         }
      }
      

      Output:

      Started by user Michael Marcucilli
      Running as Michael Marcucilli
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] Start of Pipeline
      [Pipeline] node
      Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\ApplicationADSyncer-Deploy
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Check User)
      [Pipeline] bat
      
      C:\Program Files (x86)\Jenkins\workspace\ApplicationADSyncer-Deploy>whoami
      hps\svcbuildadmin
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS

      I classified this as "Major" because to me this is a severe loss of function, i.e. the core function of the plugin does not appear to be working.  

       

       

       

            Unassigned Unassigned
            michael_marcucilli Mike Marcucilli
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: