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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          eyalbe Eyal Ben Moshe added a comment -

          Thanks for reporting this.

          We're checking this now.

          Show
          eyalbe Eyal Ben Moshe added a comment - Thanks for reporting this. We're checking this now.
          Hide
          jlycke 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.

           

           

           

          Show
          jlycke 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.      
          Hide
          yahaviz Yahav Itzhak added a comment -

          Jens Lycke,
          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.

          Show
          yahaviz Yahav Itzhak added a comment - Jens Lycke , 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 .
          Hide
          avivc Aviv Cohen added a comment -

          Hi Yahav Itzhak,

          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 

          Show
          avivc Aviv Cohen added a comment - Hi  Yahav Itzhak , 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 
          Hide
          dimanevelev Dima Nevelev added a comment -

          Hi Aviv Cohen and Jens Lycke ,
          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.

          Show
          dimanevelev Dima Nevelev added a comment - Hi Aviv Cohen and Jens Lycke , 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.
          Hide
          broussar 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

          Show
          broussar 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

            People

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

              Dates

              Created:
              Updated: