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

dsl job doesn't create a build step for Performance Center using Jenkins API

      I set up a new Jenkins server  2.138.1( previous server had Jenkins version 1.7, micro focus plugin 4.0.1)  and installed this plugin version 5.5 to integrate our Load Runner scripts with jenkins. We are using dsl scripts to build all Jenkins jobs. Somehow my dsl job doesn't create a build step for Performance Center anymore and I see no specific error messages anywhere. Maybe url for API changed, or this new version of plugin requires me to update code. On my old server this script works just fine. Here is part of groovy script which isn't working anymore. Other steps related to Bitbucket/scm and post build work okay. I'm attaching groovy  script also

       

      configure { project ->
      project / builders << {'com.hp.application.automation.tools.run.PcBuilder'(plugin: 'hp-application-automation-tools-plugin@5.5') {
      //{'com.microfocus.application.automation.tools.settings.OctaneServerSettingsBuilder_-OctaneDescriptorImpl'(plugin: 'hp-application-automation-tools-plugin@5.5') {

      'pcModel' {
      'pcServerName' 'server'
      'almUserName' 'jenkinsACA'
      //'almPassword' 'adpaca'
      //'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl")

      { // '__secret' 'SVgLEvbkajdZLrVegImgVQ==' //}

      'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl")

      { '__secret' 'Dsr90dh/+d6p3F8Mi5p4897Scnz/rUOsGF8TEsxzRxI=' }

      'almDomain' 'NAS'
      'almProject' 'ACA'
      'testId' test.testId
      'testInstanceId' test.testInstanceId
      'timeslotDuration'

      { 'Hours' test.hours 'Minutes' test.minutes }

      'postRunAction' 'COLLATE_AND_ANALYZE'
      'vudsMode' 'false'
      delegate.description test.description
      }
      'statusBySLA' 'false'
      'runId' 0
      }
      }
      }

          [JENKINS-54632] dsl job doesn't create a build step for Performance Center using Jenkins API

          Eduard Karlin created issue -

          Daniel Danan added a comment -

          Hi Eduard,
          your assumption is correct: an additional feature was added to this plugin and it requires additional parameter (retrying to execute test after a waiting time when test fails to run).
          regards,
          Daniel

          Daniel Danan added a comment - Hi Eduard, your assumption is correct: an additional feature was added to this plugin and it requires additional parameter (retrying to execute test after a waiting time when test fails to run). regards, Daniel

          Eduard Karlin added a comment -

          Hi Daniel,

          What is the name of this parameter? And how I can find a list of all required parameters for performance center builds? This code was written before me and I'm trying to find all this information now.

          Thanks,

          Eduard.

          Eduard Karlin added a comment - Hi Daniel, What is the name of this parameter? And how I can find a list of all required parameters for performance center builds? This code was written before me and I'm trying to find all this information now. Thanks, Eduard.
          Eduard Karlin made changes -
          Description Original: I set up a new Jenkins server {color:#a94442} 2.138.1( previous server had Jenkins version 1.7, micro focus plugin 4.0.1) {color} and installed this plugin version 5.5 to integrate our Load Runner scripts with jenkins. We are using dsl scripts to build all Jenkins jobs. Somehow my dsl job doesn't create a build step for Performance Center anymore and I see no specific error messages anywhere. Maybe url for API changed, or this new version of plugin requires me to update code. On my old server this script works just fine. Here is part of groovy script which isn't working anymore. Other steps related to Bitbucket/scm and post build work okay. I'm attaching groovy  script also

           

          configure { project ->
           project / builders << {'com.hp.application.automation.tools.run.PcBuilder'(plugin: 'hp-application-automation-tools-plugin@5.5') {
           //{'com.microfocus.application.automation.tools.settings.OctaneServerSettingsBuilder_-OctaneDescriptorImpl'(plugin: 'hp-application-automation-tools-plugin@5.5') {

           'pcModel' {
           'pcServerName' '[cdlpfpcsvr04.es.ad.adp.com|http://cdlpfpcsvr04.es.ad.adp.com/]'
           'almUserName' 'jenkinsACA'
           //'almPassword' 'adpaca'
           //'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl"){
           // '__secret' 'SVgLEvbkajdZLrVegImgVQ=='
           //}
           'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl"){
           '__secret' 'Dsr90dh/+d6p3F8Mi5p4897Scnz/rUOsGF8TEsxzRxI='
           }
           'almDomain' 'NAS'
           'almProject' 'ACA'
           'testId' test.testId
           'testInstanceId' test.testInstanceId
           'timeslotDuration'{
           'Hours' test.hours
           'Minutes' test.minutes
           }
           'postRunAction' 'COLLATE_AND_ANALYZE'
           'vudsMode' 'false'
           delegate.description test.description
           }
           'statusBySLA' 'false'
           'runId' 0
           }
           }
           }
          New: I set up a new Jenkins server {color:#a94442} 2.138.1( previous server had Jenkins version 1.7, micro focus plugin 4.0.1) {color} and installed this plugin version 5.5 to integrate our Load Runner scripts with jenkins. We are using dsl scripts to build all Jenkins jobs. Somehow my dsl job doesn't create a build step for Performance Center anymore and I see no specific error messages anywhere. Maybe url for API changed, or this new version of plugin requires me to update code. On my old server this script works just fine. Here is part of groovy script which isn't working anymore. Other steps related to Bitbucket/scm and post build work okay. I'm attaching groovy  script also

           

          configure { project ->
           project / builders << {'com.hp.application.automation.tools.run.PcBuilder'(plugin: 'hp-application-automation-tools-plugin@5.5') {
           //{'com.microfocus.application.automation.tools.settings.OctaneServerSettingsBuilder_-OctaneDescriptorImpl'(plugin: 'hp-application-automation-tools-plugin@5.5') {

          'pcModel' {
           'pcServerName' 'server'
           'almUserName' 'jenkinsACA'
           //'almPassword' 'adpaca'
           //'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl")

          { // '__secret' 'SVgLEvbkajdZLrVegImgVQ==' //}

          'almPassword'(class:"com.hp.application.automation.tools.model.SecretContainerImpl")

          { '__secret' 'Dsr90dh/+d6p3F8Mi5p4897Scnz/rUOsGF8TEsxzRxI=' }

          'almDomain' 'NAS'
           'almProject' 'ACA'
           'testId' test.testId
           'testInstanceId' test.testInstanceId
           'timeslotDuration'

          { 'Hours' test.hours 'Minutes' test.minutes }

          'postRunAction' 'COLLATE_AND_ANALYZE'
           'vudsMode' 'false'
           delegate.description test.description
           }
           'statusBySLA' 'false'
           'runId' 0
           }
           }
           }

          Daniel Danan added a comment -

          Hi Eduard,
          I believe you can get all the parameter from generating a pipeline syntax for the "pcBuild" sample step ( <JenkinsserverUrl>/job/pc_pipeline/pipeline-syntax/). The new parameters are in bold and red below.
          I also forgot to mention that, due to security requirements, the parameters related to the authentication have been modified and the almUserName, almPassword are replaced by credentialsId (same for proxy credentials parameters):

          pcBuild
          HTTPSProtocol: false,
          almDomain: '',
          almProject: '',
          autoTestInstanceID: 'AUTO',
          credentialsId: '',
          credentialsProxyId: '',

          description: '',
          pcServerName: '',
          postRunAction: 'COLLATE',
          proxyOutURL: '',
          *retry: 'NO_RETRY',
          retryDelay: '5',
          retryOccurrences: '3', *

          serverAndPort: 'http://myjenkinserver:8080',
          statusBySLA: false,
          testId: '',
          testInstanceId: '',
          timeslotDurationHours: '0',
          timeslotDurationMinutes: '30',
          trendReportId: '',
          vudsMode: false

          regards,
          Daniel

          Daniel Danan added a comment - Hi Eduard, I believe you can get all the parameter from generating a pipeline syntax for the "pcBuild" sample step ( <JenkinsserverUrl>/job/pc_pipeline/pipeline-syntax/). The new parameters are in bold and red below. I also forgot to mention that, due to security requirements, the parameters related to the authentication have been modified and the almUserName, almPassword are replaced by credentialsId (same for proxy credentials parameters): pcBuild HTTPSProtocol: false, almDomain: '', almProject: '', autoTestInstanceID: 'AUTO', credentialsId: '', credentialsProxyId: '', description: '', pcServerName: '', postRunAction: 'COLLATE', proxyOutURL: '', *retry: 'NO_RETRY', retryDelay: '5', retryOccurrences: '3', * serverAndPort: 'http://myjenkinserver:8080', statusBySLA: false, testId: '', testInstanceId: '', timeslotDurationHours: '0', timeslotDurationMinutes: '30', trendReportId: '', vudsMode: false regards, Daniel
          Daniel Danan made changes -
          Attachment New: pipeline_syntax.png [ 45165 ]

          Eduard Karlin added a comment -

          Hi Daniel,

          Somehow it's still not working for me. Now I can't even generate this build step on my old Jenkins Server. Maybe it's an issue wit pipeline name step? In the current code I see:

          'pcModel' 

          { 'pcServerName' 'cdlpfpcsvr04.es.ad.adp.com'

          'almUserName' 'jenkinsACA'

          'almPassword' 'adpaca'

           But you mentioned "pcBuild". Was it changed recently from "pcModel" to "pcBuild"?

          Maybe you also have some sample of groovy code which can be used to build this step?

          post build steps are generated with no issues:

          configure { project -> configure { project -> project / publishers << {'com.hp.application.automation.tools.results.RunResultRecorder'(plugin:"hp-application-automation-tools-plugin@4.0.1"){ '__resultsPublisherModel'

          { 'archiveTestResultsMode' 'PUBLISH_HTML_REPORT' }

          } } }

           

          publishers{ downstreamParameterized {             trigger("Report for ${jobId}") {                 condition('SUCCESS')             }        } }

           

          Eduard Karlin added a comment - Hi Daniel, Somehow it's still not working for me. Now I can't even generate this build step on my old Jenkins Server. Maybe it's an issue wit pipeline name step? In the current code I see: 'pcModel'  { 'pcServerName' 'cdlpfpcsvr04.es.ad.adp.com' 'almUserName' 'jenkinsACA' 'almPassword' 'adpaca'  But you mentioned "pcBuild". Was it changed recently from "pcModel" to "pcBuild"? Maybe you also have some sample of groovy code which can be used to build this step? post build steps are generated with no issues: configure { project -> configure { project -> project / publishers << {'com.hp.application.automation.tools.results.RunResultRecorder'(plugin:"hp-application-automation-tools-plugin@4.0.1"){ '__resultsPublisherModel' { 'archiveTestResultsMode' 'PUBLISH_HTML_REPORT' } } } }   publishers{ downstreamParameterized {             trigger("Report for ${jobId}") {                 condition('SUCCESS')             }        } }  
          Eduard Karlin made changes -
          Assignee Original: Daniel Danan [ danieldanan ] New: Eduard Karlin [ edkarlin ]
          Eduard Karlin made changes -
          Assignee Original: Eduard Karlin [ edkarlin ] New: Daniel MS [ daniel ]
          Eduard Karlin made changes -
          Assignee Original: Daniel MS [ daniel ] New: Daniel Danan [ danieldanan ]

            danieldanan Daniel Danan
            edkarlin Eduard Karlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: