File modification time in pipeline

bigferumdron September 2, 2020

Hi everybody. 

When files are mounted in docker container which is run during bitbucket pipeline performing, their last file modification time is changed (it is set as the execution time of the pipeline script)

Why is this happening?

Some of my script depends of file modification time. For example in my pipeline I run compressing resources of my framework, and push them back to repository if need, and the name of the folder where they publish, depends of file modification time of these resources.

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2020

Hello and welcome to the community!

When you run a build in Pipelines, the repository is cloned in the Docker container that starts.

The file modification time is something set by Git. You will see the same behavior if you e.g. clone a repository in your computer, the modification time for the files is going to be the time that you made the clone.

This is an intentional decision by the Git team and is addressed in the following question:

https://git.wiki.kernel.org/index.php/GitFaq#Why_isn.27t_Git_preserving_modification_time_on_files.3F

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events