You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running codeship_aws eb_deploy, a new version is namedVERSION_NAME=${CI_COMMIT_ID}-${CI_BUILD_ID}-$(date +%Y-%m-%d.%H:%M:%S). This is usually fine, but when running two parallel deployment steps to different environments but the same application, it's possible for the steps to start at exactly the same second.
I can think of a few ways to fix this:
Add the environment name to VERSION_NAME, e.g. VERSION_NAME=${CI_COMMIT_ID}-${CI_BUILD_ID}-${ENVIRONMENT_NAME}-$(date +%Y-%m-%d.%H:%M:%S)
Prepend S3_BUCKET_SUBFOLDER_PATH to VERSION_NAME, e.g. VERSION_NAME=${S3_BUCKET_SUBFOLDER_PATH}-${CI_COMMIT_ID}-${CI_BUILD_ID}-$(date +%Y-%m-%d.%H:%M:%S)
Allow VERSION_NAME to be overridden, e.g. VERSION_NAME=${VERSION_NAME:-${CI_COMMIT_ID}-${CI_BUILD_ID}-${ENVIRONMENT_NAME}-$(date +%Y-%m-%d.%H:%M:%S)}
Stick a random UUID on the end
Change the date format to use higher precision, so at least it will happen less
I'm happy to put up a PR for this if we reach a decision on which option is best, although given that it's a one-liner, it might be easier for whoever sees this to just go ahead and make the change themselves.
The text was updated successfully, but these errors were encountered:
For more context on why anyone would want to do this, we have multiple demo environments for different clients automatically deployed from the same branch in the same parallel step.
When running
codeship_aws eb_deploy
, a new version is namedVERSION_NAME=${CI_COMMIT_ID}-${CI_BUILD_ID}-$(date +%Y-%m-%d.%H:%M:%S)
. This is usually fine, but when running two parallel deployment steps to different environments but the same application, it's possible for the steps to start at exactly the same second.I can think of a few ways to fix this:
VERSION_NAME
, e.g.VERSION_NAME=${CI_COMMIT_ID}-${CI_BUILD_ID}-${ENVIRONMENT_NAME}-$(date +%Y-%m-%d.%H:%M:%S)
S3_BUCKET_SUBFOLDER_PATH
toVERSION_NAME
, e.g.VERSION_NAME=${S3_BUCKET_SUBFOLDER_PATH}-${CI_COMMIT_ID}-${CI_BUILD_ID}-$(date +%Y-%m-%d.%H:%M:%S)
VERSION_NAME
to be overridden, e.g.VERSION_NAME=${VERSION_NAME:-${CI_COMMIT_ID}-${CI_BUILD_ID}-${ENVIRONMENT_NAME}-$(date +%Y-%m-%d.%H:%M:%S)}
date
format to use higher precision, so at least it will happen lessI'm happy to put up a PR for this if we reach a decision on which option is best, although given that it's a one-liner, it might be easier for whoever sees this to just go ahead and make the change themselves.
The text was updated successfully, but these errors were encountered: