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

Can't use "props" in spec file with artifactory-plugin 2.12

      Using "props" in artifactory spec files stopped working after updating the artifactory-plugin from version 2.11 to 2.12. We use "Generic-Artifactory Integration" with the spec file:

      {
        "files": [
           {
              "pattern": "generic-local/dir/*",
              "target": "outdir/",
              "props": "key=${val}",
              "flat": "true"
           }
        ]
      }

      The given property above does exist on some of the binaries in the "generic-local/dir" directory in Artifactory. The "props" field in the spec file is used to filter out those artifacts. Unfortunately this stopped working with version 2.12. Note that the property includes an environment variable.

      Downgrading the plugin to version 2.11 only downloads the artifacts in the "generic-local/dir" folder which have the property given in the spec file. This is the expected behavior.

          [JENKINS-45439] Can't use "props" in spec file with artifactory-plugin 2.12

          Thanks for reporting this.

          We're checking this now.

          Eyal Ben Moshe added a comment - Thanks for reporting this. We're checking this now.

          Jens Lycke added a comment -

          Thanks!

          Note that my "props" field include a jenkins environment variable. I updated the ticket accordingly.

          2.12 seems to fetch the correct artifacts if I hard code the "props" value but if I use an environment variable the 2.12 version doesn't fetch anything. Using environment variables works in 2.11.

           

           

           

          Jens Lycke added a comment - Thanks! Note that my "props" field include a jenkins environment variable. I updated the ticket accordingly. 2.12 seems to fetch the correct artifacts if I hard code the "props" value but if I use an environment variable the 2.12 version doesn't fetch anything. Using environment variables works in 2.11.      

          Yahav Itzhak added a comment -

          jlycke,
          We appreciate your feedback, this issues was already fixed in our latest 2.12.1 Jenkins Artifactory plugin version.
          The fix commit can be viewed here.

          Yahav Itzhak added a comment - jlycke , We appreciate your feedback, this issues was already fixed in our latest 2.12.1 Jenkins Artifactory plugin version. The fix commit can be viewed here .

          Aviv Cohen added a comment -

          Hi yahaviz,

          Seems that issue still happening.

          When running the job SPECS upload & set up a file, all environment variable display in the console as key and not value

          For now, I've downgrade the plugin back to 2.11.0 to overcome this issue

          Pls. update

          BR 

          Aviv Cohen added a comment - Hi  yahaviz , Seems that issue still happening. When running the job SPECS upload & set up a file, all environment variable display in the console as key and not value For now, I've downgrade the plugin back to 2.11.0 to overcome this issue Pls. update BR 

          Dima Nevelev added a comment -

          Hi avivc and jlycke ,
          Thank you again for reporting this issue.
          We pushed the following commit to fix this issue:
          509e5e601d1a9fb27a52cbc6ed5622c47c201328
          Here's a download link to a snapshot version which includes the fix: 
          https://oss.jfrog.org/artifactory/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.12.3-SNAPSHOT/artifactory-2.12.3-20170919.155408-22.hpi
          We'd appreciate your feedback for this fix.

          Dima Nevelev added a comment - Hi avivc and jlycke , Thank you again for reporting this issue. We pushed the following commit to fix this issue: 509e5e601d1a9fb27a52cbc6ed5622c47c201328 Here's a download link to a snapshot version which includes the fix:  https://oss.jfrog.org/artifactory/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.12.3-SNAPSHOT/artifactory-2.12.3-20170919.155408-22.hpi We'd appreciate your feedback for this fix.

          Can this be closed?

           I came across this issue when looking for Doc on how to attach properties to artifacts in Jenkins pipeline code.

          Neither

          https://www.jfrog.com/confluence/display/RTF5X/Working+With+Pipeline+Jobs+in+Jenkins

          nor

          https://www.jfrog.com/confluence/display/RTF/Properties

          had the info I needed.

          I added the props field to my uploadSpec and it appears to be working. Have not tried in a downloadSpec, which is what the issue may be referring to.

          Plugin version 3.0.0

          Jenkins 2.150.1

          Adam Brousseau added a comment - Can this be closed?  I came across this issue when looking for Doc on how to attach properties to artifacts in Jenkins pipeline code. Neither https://www.jfrog.com/confluence/display/RTF5X/Working+With+Pipeline+Jobs+in+Jenkins nor https://www.jfrog.com/confluence/display/RTF/Properties had the info I needed. I added the props field to my uploadSpec and it appears to be working. Have not tried in a downloadSpec, which is what the issue may be referring to. Plugin version 3.0.0 Jenkins 2.150.1

            eyalbe Eyal Ben Moshe
            jlycke Jens Lycke
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: