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

Archiving artifacts does not preserve timestamps if archived on master

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows 7, Java 1.8, Jenkins 1.575
      Linux 64, Java 1.8, Jenkins 1.647
    • Similar Issues:

      Description

      When a build run on the master, "Archive the artifacts" doesn't preserve timestamps.
      It preserves timestamps when run on slaves.

      It looks caused by FilePath.copyRecursiveTo.


      Original description (the issue was found not of Copyartifact, but of ArtifactArchiver):

      The timestamps of artifacts are not preserved when archiving artifacts, OR performing a CopyArtifact operation if the artifact filter is set to "**".

      For example the filter

      "myfolder\**"

      will preserve timestamps.

      We use mutiple chained Jenkins jobs to perform a build. If the timestamps of dependency files in the artifact passed between jobs is not preserved, then subsequent jobs will fail.

        Attachments

          Issue Links

            Activity

            Hide
            tib Timmy Brolin added a comment -

            Tested on Jenkins 1.575, with java 1.8
            ---------------------------------------

            Job running on master archiving artifacts to master: Incorrect timestamps.

            Job running on slave archiving artifacts to master: Timestamps ok.

            Downstream job running on master copying artifacts from master: Timestamps ok.

            Downstream job running on slave copying artifacts from master: Timestamps ok.

            Does this make any sense?

            Show
            tib Timmy Brolin added a comment - Tested on Jenkins 1.575, with java 1.8 --------------------------------------- Job running on master archiving artifacts to master: Incorrect timestamps. Job running on slave archiving artifacts to master: Timestamps ok. Downstream job running on master copying artifacts from master: Timestamps ok. Downstream job running on slave copying artifacts from master: Timestamps ok. Does this make any sense?
            Hide
            ikedam ikedam added a comment -

            That's exactly what @danielbeck pointed.
            Thanks for clarifying.
            I updated the summary and the description.

            I think it won't be fixed so soon, and you'd better try workarounds like:

            • Archive files with zip command in the upstream project, and extract them with unzip in the downstream project.
            • Have builds run only on slaves. This can be done by enabling "Restrict where this project can be run" in project configuration pages.
            Show
            ikedam ikedam added a comment - That's exactly what @danielbeck pointed. Thanks for clarifying. I updated the summary and the description. I think it won't be fixed so soon, and you'd better try workarounds like: Archive files with zip command in the upstream project, and extract them with unzip in the downstream project. Have builds run only on slaves. This can be done by enabling "Restrict where this project can be run" in project configuration pages.
            Hide
            danielbeck Daniel Beck added a comment -

            FWIW some [citation needed] consider running no builds on the master node a Jenkins best practice, so that may be worth implementing even beyond this issue.

            Show
            danielbeck Daniel Beck added a comment - FWIW some [citation needed] consider running no builds on the master node a Jenkins best practice, so that may be worth implementing even beyond this issue.
            Hide
            tib Timmy Brolin added a comment -

            Yes, preventing jobs from running on the master solves the problem.

            Show
            tib Timmy Brolin added a comment - Yes, preventing jobs from running on the master solves the problem.
            Hide
            olenz Olaf Lenz added a comment -

            The problem still exists in 1.647. Does this really mean that I have to run a slave on the same host where the master runs, just to be able to use the host?

            Show
            olenz Olaf Lenz added a comment - The problem still exists in 1.647. Does this really mean that I have to run a slave on the same host where the master runs, just to be able to use the host?

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tib Timmy Brolin
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: