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

Upload spec does not resolve placeholders in target path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • artifactory-plugin
    • None
    • Ubuntu 16.04.1 LTS
      Jenkins version 2.32.1
      artifactory-plugin version 2.9.2

      This works with artifactory-plugin version 2.9.1.

       

      def uploadSpec = """{
       "files": [
         {
           "pattern": "local/${organization}/${moduleName}/(.*?)/(.*?)/(.*?)-SNAPSHOT/(.*?)/(.*?).jar",
           "regexp" : true,
           "target": "${repositoryName}/${organization}/${moduleName}/{1}/{2}/{3}/{4}/{5}.jar"
         }
       ]
      }"""

      with log output:

      For pattern: local/<orga>/<module>/(*)/(*)/(*)-SNAPSHOT/(*)/(*).jar 3 artifacts were found.
      Deploying artifact: http://<artifactory-server>/<repository>/<orga>/<module>/scala_2.10/sbt_0.13/1.0.2/jars/<module>.jar
      Deploying artifact: http://<artifactory-server>/<repository>/<orga>/<module>/scala_2.10/sbt_0.13/1.0.2/jars/<module>-sources.jar
      Deploying artifact: http://<artifactory-server>/<repository>/<orga>/<module>/scala_2.10/sbt_0.13/1.0.2/jars/<module>-javadoc.jar
      

       

      After an upgrade to 2.9.2, the placeholders are no longer resolved. Log shows:

      For pattern: local/<orga>/<module>/(*)/(*)/(*)-SNAPSHOT/(*)/(*).jar 3 artifacts were found.
      Deploying artifact: http://<artifactory-server>/<repository>/<orga>/<module>/{1}/{2}/{3}/{4}/{5}.jar

       

            eyalbe Eyal Ben Moshe
            dg_skolberg Sascha Kolberg
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: