Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20301

Remote artifact handler successfully publishes missing artifact

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 6.9.0
    • allversions
    • Agents, Artifacts
    • None

    Description

      Issue Summary

      The remote agent handler should fail to publish an artifact if there are no files that match the specified pattern. If no match is found an empty artifact is published and the job is considered to succeed.

      Steps to Reproduce

      1. Create a Job that has a shared/ required artifact matching "*.zip"
      2. specify that remote agent handler should be used for shared artifacts.
      3. run job on remote agent

      Expected Results

      If the artifact does not match any files we would expect the artifact to fail to publish as is seen with the local artifact handler.

      2019-02-11 10:05:41,067 INFO [18-BAM::Default Agent::Agent:pool-32-thread-1] [ExecuteBuildTask] TST-ACT-JOB1-25: Running post build plugin 'Artifact Copier'
      2019-02-11 10:05:41,068 INFO [18-BAM::Default Agent::Agent:pool-32-thread-1] [BuildArtifactPostProcessor] Copying the build artifacts for build: TST-ACT-JOB1-25
      2019-02-11 10:05:41,267 WARN [18-BAM::Default Agent::Agent:pool-32-thread-1] [AbstractArtifactManager] Publishing [newa] for TST-ACT-JOB1-25: no files matching [*.zip] in directory /home/bamboo/bamboo-home/xml-data/build-dir/TST-CLOUD-JOB1
      2019-02-11 10:05:41,360 INFO [18-BAM::Default Agent::Agent:pool-32-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.ServerLocalArtifactHandler
      2019-02-11 10:05:41,379 INFO [18-BAM::Default Agent::Agent:pool-32-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.ServerLocalArtifactHandler did not publish the artifact
      2019-02-11 10:05:41,379 ERROR [18-BAM::Default Agent::Agent:pool-32-thread-1] [AbstractArtifactManager] Unable to publish artifact [newa]:
      2019-02-11 10:05:41,379 ERROR [18-BAM::Default Agent::Agent:pool-32-thread-1] [AbstractArtifactManager] TST-ART-JOB1-25: The artifact is required, build will now fail.
      

      Actual Results

      In the logs on the remote agent atlassian-bamboo.log file we see that the artifact is successfully published:

      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,370 INFO [4-BAM::bamboo::Agent:pool-7-thread-1] [ExecuteBuildTask] Running post build plugin 'Artifact Copier'
      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,373 INFO [4-BAM::bamboo::Agent:pool-7-thread-1] [BuildArtifactPostProcessor] Copying the build artifacts for build: TST-ART-JOB1-27
      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,407 WARN [4-BAM::bamboo::Agent:pool-7-thread-1] [AbstractArtifactManager] Publishing [newa] for TST-ART-JOB1-27: no files matching [*.zip] in directory /home/bamboo/bamboo-agent-home/xml-data/build-dir/TST-ART-JOB1
      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,414 INFO [4-BAM::bamboo::Agent:pool-7-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler
      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,435 INFO [4-BAM::bamboo::Agent:pool-7-thread-1] [BambooArtifactHttpTransport] Finished writing the artifact to the output stream, time elapsed: 8.441 ms
      INFO   | jvm 2    | 2019/02/11 12:18:54 | 2019-02-11 12:18:54,471 INFO [4-BAM::bamboo::Agent:pool-7-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler published the artifact, size: 0 bytes, time elapsed: 57.57 ms
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              achystoprudov Alexey Chystoprudov
              cberry@atlassian.com Chris Berry
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: