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

HTTP Request Issue on URL redirect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: http-request-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.254
      httpRequest  plugin v. 1.8.26
      RHEL 7.x
    • Similar Issues:

      Description

      I have a Jenkins pipeline downloading artifacts from a Nexus using its API.

      To avoid using platform dependent tools (e.g. wget), I have looked into using the httpRequest  plugin (v. 1.8.26 on Jenkins 2.254).

      When using the following a stage steps

      def artifactFilename = "${ARTIFACT_ID}.${artifactExtension}"
      def artifactURL = "${nexus3BaseUrl}/service/rest/v1/search/assets/download?repository=${NEXUS_REPO}&group=${GROUP_ID}&name=${ARTIFACT_ID}&maven.baseVersion=${versionFilter}&maven.extension=${artifactExtension}&maven.classifier&sort=version&direction=desc"
      def response = httpRequest httpMode: 'GET', url: artifactURL, consoleLogResponseBody: true , outputFile: "${env.WORKSPACE}/tmp/${artifactFilename}"
      

      The console shows the following outputs and stay stuck there:

      HttpMethod: GET
      URL: [the nexus API URL]
      Sending request to url: [the nexus API URL]
      Response Code: HTTP/1.1 200 OK
      

      The same logic using WGET takes seconds, whereas with the HTTP Request plugin it stays stuck there until the build execution times out (even if the Nexus server in on the local host)

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            janario Janario Oliveira
            Reporter:
            ceddaerrix Cedric H
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: