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

"Publish artifacts to Artifactory" option only publish build info to artifactory but not the artifact.

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major

      I have a simple Ant/Ivy Java project. (workspace.zip) I want to trigger a build on Jenkins such that it will publish the artifact and the ivy descriptor to the Artifactory after the build.

      I have created 3 different type of jobs.

      • Job A: an Ivy project
      • Job B: free-style software project
      • Job C: free-style software project

      ***********************************************************************

      For Job A, i have enabled the "Publish to Artifactory" with "Publish artifacts to Artifactory" checked. You can refer to job-a-config.png.

      After the build, it is found that only the build info is published to the Artifactory but not the artifact. (job-a-build-output.png)

      ***********************************************************************

      For Job B, i have enabled the "Ant/Ivy-Artifactory Integration" with "Publish artifacts to Artifactory" checked. You can refer to job-b-config.png.

      After the build, it is found that only the build info is published to the Artifactory but not the artifact. (job-b-build-output.png)

      ***********************************************************************

      For Job C, i have enabled the "Generic-Artifactory Integration" with "Published Artifacts" set. You can refer to job-c-config.png.

      After the build, the artifact is found in the build folder and it is published to the Artifactory. (job-c-build-output.png)

      ***********************************************************************

      Although i could published the artifact to Artifactory in Job C, i would like to make use of the build features provided by the Ivy Plugin (Job A: job-a-config.png) such that i could have more "Build Triggers" options.

      Moreover, i would like to know the reason why the "Publish artifacts to Artifactory" doesn't work in Job A and Job B.

      And i would also like to know more about the "Settings file" under "Ivy Module Configuration" in job-a-config.png. What does it referring to?

      Thanks for your help.

        1. job-a-build-output.png
          job-a-build-output.png
          123 kB
        2. job-a-config.png
          job-a-config.png
          148 kB
        3. job-b-build-output.png
          job-b-build-output.png
          121 kB
        4. job-b-config.png
          job-b-config.png
          128 kB
        5. job-c-build-output.png
          job-c-build-output.png
          115 kB
        6. job-c-config.png
          job-c-config.png
          121 kB
        7. workspace.zip
          2 kB

          [JENKINS-19537] "Publish artifacts to Artifactory" option only publish build info to artifactory but not the artifact.

          Kevin Formsma added a comment -

          The reason this isn't working for Job A and B, is because you need to publish your artifacts to a local ivy repository. Then, the artifactory plugin will pick up the artifact and replicate that local publish to your artifactory server.

          From the wiki:

          Publishing to your local file cache repository is the best way to go (i.e. you do not need to publish to Artifactory). The plugin will intercept the publish events and will replay them against Artifactory according to the configuration. Using an ivy:publish task that publishes directly to Artifactory will result in (redundant) double publishing.

          Kevin Formsma added a comment - The reason this isn't working for Job A and B, is because you need to publish your artifacts to a local ivy repository. Then, the artifactory plugin will pick up the artifact and replicate that local publish to your artifactory server. From the wiki: Publishing to your local file cache repository is the best way to go (i.e. you do not need to publish to Artifactory). The plugin will intercept the publish events and will replay them against Artifactory according to the configuration. Using an ivy:publish task that publishes directly to Artifactory will result in (redundant) double publishing.

            arothian Kevin Formsma
            ykyuen Kit Yuen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: