Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

File modification time in pipeline

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

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
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

117 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you