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.
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:
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...
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