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

Unable to update Review due to bad Swarm URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      Hi Paul

      [Pipeline] echo
      Review: 12229, review type: SHELVED
      [Pipeline] p4approve
      ... p4 property -nP4.Swarm.URL -l +
      ... p4 info +
      ... p4 login -s +
      [Pipeline] echoException occurred
      [Pipeline] echo
      java.io.IOException: Unable to update Review.
      [Pipeline] } 

       
      In the above, the Swarm URL was incorrect. It would be nice to see something more than “Exception occurred”.

                      script {
                          try {
                              echo "Review type: ${P4_REVIEW_TYPE}"
                              if ("${P4_REVIEW_TYPE}" == "SHELVED") {
                                  echo "Review: ${P4_REVIEW}, review type: ${P4_REVIEW_TYPE}"
                                  p4approve credential: "${env.p4_credential}",
                                      review: '${P4_REVIEW}', status: 'COMMIT'
                                  // Now set the review state back to 'needs review'
                                  p4approve credential: "${env.p4_credential}",
                                      review: '${P4_REVIEW}', status: 'REVIEW'
                              } else {
                                  echo "Skipping Swarm approval as changelist already submitted"
                              }
                          } catch(Exception e) {
                              // Do something with the exception
                              echo "Exception occurred"
                              echo "${e.toString()}"
                              currentBuild.result = 'SUCCESS'
                          }
                      }
      

      Suggestions to extract more info?

      This was the value of the property:

      1. curl http://webserver.swarm2

      curl: (6) Could not resolve host: webserver.swarm2

      Robert

            p4paul Paul Allen
            p4paul Paul Allen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: