If a release directory is created, by default is uses the local environment to generate the timestamp. It uses Python, like so:
#!python
time.strftime('%Y%m%d%H%M%S')
This is run on the local deployment system where Fabric is being executed. ie, developers laptop. If a dev is in a timezone ahead of another developer, there can be a situation where the newer deployment is considered older than the existing deployment folders. Thus when using the "remove_old_release" method will delete the "oldest" timestamped folder, which in this case, is actually the latest deployment.
This actually happened to us today. Here is a snippet:
>>> releases = '20170315143441/ 20170315152715/ 20170315152557/ 20170315152256/ 20170315152153/'
>>> releases = [x.replace('/', '') for x in releases.split()]
>>> sorted(releases)
['20170315143441',
'20170315152153',
'20170315152256',
'20170315152557',
'20170315152715']
>>>
In this case, the folder "20170315143441" is showing as oldest folder when it actually is the newest deployment folder.
Updated dynamic release directory to use utc time instead of local time. Closes Issue #5
→ <<cset 67456eb82d26>>