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

Artifactory plugin using entire artifact path for deploying URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • artifactory-plugin
    • None
    • Jenkins 2.89.4 on Windows Server 2012 R2. Artifactory plugin 2.14.0.

      Artifactory plugin is using the entire artifact file system path when attempting to deploy the artifact from a freestyle job using Job configuration File Spec. I believe the cause of the issue was upgrading Jenkins to 2.89.4 from 2.73.3, as this job has been working successfully before the upgrade (but I also upgraded plugins, not sure Artifactory plugin's dependencies).

       

      File spec looks like so:

      {
      "files": [
      {
      "pattern": "${WORKSPACE}/App-${App_Version}.zip",
      "target": "my-repo/App/${App_Version}/",
      "recursive": "true",
      "flat" : "false"
      }
      ]
      }

       

      The artifact is properly identified in the job when run, but when it goes to deploy it uses the entire C:\ file system path in the URL. Log output looks like:

      For pattern: C:/Jenkins/jobs/app/workspace/app-version-1.6.11.zip 1 artifacts were found.
      Deploying artifact: https://server.com/artifactory/repos/app/1.6.11/C%3A/Jenkins/jobs/app/workspace/app-version-1.6.11.zip
      ERROR: Failed to deploy file. Status code: 500 Response message: Artifactory returned the following errors:
      Invalid path. ':' is not a valid name character: repos/app/1.6.11/C:/ Status code: 500
      java.io.IOException: Failed to deploy file. Status code: 500 Response message: Artifactory returned the following errors:
      Invalid path. ':' is not a valid name character: repos/app/1.6.11/C:/ Status code: 500
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:656)
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:343)
      at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.deploy(SpecsHelper.java:291)
      at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:65)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:189)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:130)
      at hudson.FilePath.act(FilePath.java:997)
      at hudson.FilePath.act(FilePath.java:975)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:76)
      at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:401)
      at hudson.model.Build$BuildExecution.doRun(Build.java:174)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      at hudson.model.Run.execute(Run.java:1724)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

       

      It is failing due to the : character in C:\, but regardless it should not be trying to deploy to that URL. Before the 2.89.4 upgrade it was working fine, now broken with no changed to the job config.
       

            eyalbe Eyal Ben Moshe
            modemboy Andrew Grether
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: