Skip to content
Snippets Groups Projects
Commit bf348689 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Upload EE release packages to random directory

parent fce242c0
No related branches found
No related tags found
1 merge request!60Gitlab Ee
Loading
Loading
@@ -34,12 +34,22 @@ if [[ -z ${release_package} ]]; then
error_exit 'could not find the release package'
fi
 
if (git describe | grep -w ee); then
release_dir="$(openssl rand -hex 20)"
if [[ $? -ne 0 ]]; then
error_exit 'failed to generate release directory name'
fi
remote_package_path="s3://${RELEASE_BUCKET}/${release_dir}/${release_package}"
else
remote_package_path="s3://${RELEASE_BUCKET}/${release_package}"
fi
echo
echo 'Package MD5:'
md5sum ${release_package}
 
echo
echo 'Starting upload'
if !(aws s3 cp ${release_package} s3://${RELEASE_BUCKET} --acl public-read --region ${RELEASE_BUCKET_REGION}); then
if !(aws s3 cp ${release_package} ${remote_package_path} --acl public-read --region ${RELEASE_BUCKET_REGION}); then
error_exit 'release upload failed'
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment