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

Environment Variables in Generic-Artifactory Integration do not expand

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • artifactory-plugin
    • None

      Hello,
      i´m trying to deploy an artifact to a folder with an generic name depending on the verison (the version numver is set as an environment variable in Jenkins}:
      ../../dist/artfactname-version.war=>com/bosch/common/${version}

      but the variable is not expandet so the deployment run into an error:

      For pattern: ../../dist/artfactname-version.war 1 artifacts were found
      Deploying artifact: http://localhost:8081/artifactory/plugins-snapshot-local/com/common/${version}/artfactname-version.war
      ERROR: null
      java.lang.IllegalArgumentException
      at java.net.URI.create(URI.java:859)
      at org.apache.http.client.methods.HttpPut.<init>(HttpPut.java:68)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.createHttpPutMethod(ArtifactoryBuildInfoClient.java:559)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.tryChecksumDeploy(ArtifactoryBuildInfoClient.java:533)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:501)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:291)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:69)
      at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:225)
      at hudson.model.Build$BuildExecution.doRun(Build.java:171)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      at hudson.model.Run.execute(Run.java:1488)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      Caused by: java.net.URISyntaxException: Illegal character in path at index 89: http://localhost:8081/artifactory/plugins-snapshot-local/com/common/${version}/artfactname-version.war;build.name=artfactname;build.timestamp=1343909154981;build.number=44;vcs.revision=9036
      at java.net.URI$Parser.fail(URI.java:2825)
      at java.net.URI$Parser.checkChars(URI.java:2998)
      at java.net.URI$Parser.parseHierarchical(URI.java:3082)
      at java.net.URI$Parser.parse(URI.java:3030)
      at java.net.URI.<init>(URI.java:595)
      at java.net.URI.create(URI.java:857)
      ... 13 more
      Finished: FAILURE

      I think this is big improvement with small effort. I realy dont want to mess with maven/ivy for this projects.

          [JENKINS-14666] Environment Variables in Generic-Artifactory Integration do not expand

          There are no comments yet on this issue.

            eyalbe Eyal Ben Moshe
            ewachnow Evgeni Wachnowezki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: