Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-946

artifactory server object seems to ignore the bypassProxy setting by downloading in a pipeline

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.12.0
    • Fix Version/s: 2.13.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Artifactory 5.3.0 on the artifactory Server
      Jenkins core Version 2.67
      Pipeline Jenkins plugin Version 2.5

      Description

      Download artifacts with an artifactory server object in a Jenkins Pipeline doesn't work in the Version 2.12.0 anymore.

      Here is the error message:
      ...
      [Pipeline] artifactoryDownload
      Error occurred for request CONNECT <artifactory Server dns alias>:443 HTTP/1.1. Received status code 503 and message: Service Unavailable.
      Attempting retry #1
      Received status code 503 and message: Service Unavailable.
      ...

      Both the Jenkins Server and the artifactory Server are in an Intranet that is why the Proxy Server is deactivated here.
      We download artifacts in a Pipeline Jenkins Job with an artifactory Server object created in a groovy script:
      ...
      def artifactoryRootURL = "https://<artifactory server>:443/artifactory/"
      withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: <user id>, passwordVariable: 'artifactoryUserPassword', usernameVariable: 'artifactoryUserName']])

      { artifactoryServer = Artifactory.newServer url: artifactoryRootURL, username: artifactoryUserName, password: artifactoryUserPassword }

      artifactoryServer.setBypassProxy(true)
      def downloadSpec = """{
      "files": [

      { "pattern": "<repository>/<artifact id>/<version>/*.zip", "target": "<workspace folder>/<download folder>/" }

      ]
      }"""
      def buildInfo = artifactoryServer.download(downloadSpec)
      ...

      After downgrading to the plugin version 2.11. it works again.

      Some additional Information:

      • same error message after Setting bypassProxy to false (setBypassProxy(false))
      • no problems by uploading of artifacts with similar code (setBypassProxy(true) too)
      • similar error message by uploading of artifacts after setting bypassProxy to false
      • the flag "Bypass HTTP Proxy" in the global artifactory plugin configuration seems to work: "Test Connection" shows "Found Artifactory 5.3.0" if it is set and "Error occurred while requesting version information: Service Unavailable" if not

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eyalb Eyal Ben Moshe
                Reporter:
                alexej.pissarev Alexej Pissarev
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: