- push docker images to quay when doing shelf releases

This commit is contained in:
ehardon
2020-10-26 08:58:29 +02:00
parent acef4aff8b
commit efb05dc5ca
2 changed files with 22 additions and 0 deletions

View File

@@ -198,10 +198,12 @@ jobs:
if: commit_message =~ /\[community release .*\]/ if: commit_message =~ /\[community release .*\]/
before_script: before_script:
- source scripts/set-release-variables.sh - source scripts/set-release-variables.sh
- bash scripts/check-existing-tags.sh "alfresco/alfresco-governance-share-community"
script: script:
- bash scripts/release.sh "community" - bash scripts/release.sh "community"
before_deploy: before_deploy:
- bash scripts/zip-artifacts-staging.sh "community" - bash scripts/zip-artifacts-staging.sh "community"
- bash scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-community -i quay.io/alfresco/alfresco-governance-share-community -r quay.io -t ${RELEASE_VERSION}
deploy: deploy:
- provider: s3 - provider: s3
access_key_id: ${STAGING_AWS_ACCESS_KEY} access_key_id: ${STAGING_AWS_ACCESS_KEY}
@@ -222,10 +224,12 @@ jobs:
if: commit_message =~ /\[enterprise release .*\]/ if: commit_message =~ /\[enterprise release .*\]/
before_script: before_script:
- source scripts/set-release-variables.sh - source scripts/set-release-variables.sh
- bash scripts/check-existing-tags.sh "alfresco/alfresco-governance-share-enterprise"
script: script:
- bash scripts/release.sh "enterprise" - bash scripts/release.sh "enterprise"
before_deploy: before_deploy:
- bash scripts/zip-artifacts-staging.sh "enterprise" - bash scripts/zip-artifacts-staging.sh "enterprise"
- bash scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-enterprise -i quay.io/alfresco/alfresco-governance-share-enterprise -r quay.io -t ${RELEASE_VERSION}
deploy: deploy:
- provider: s3 - provider: s3
access_key_id: ${STAGING_AWS_ACCESS_KEY} access_key_id: ${STAGING_AWS_ACCESS_KEY}

View File

@@ -0,0 +1,18 @@
#!/bin/bash
alfresco_docker_image=$1
# Verify release tags
get_tags="$(curl https://hub.docker.com/r/$alfresco_docker_image/tags/ | grep -o '\"result\".*\"]')"
arrayTags=($get_tags)
echo "Existing Tags: $get_tags"
for tag in "${arrayTags[@]}"
do
if [[ $tag = ${RELEASE_VERSION} ]]; then
echo "Tag ${RELEASE_VERSION} already pushed, release process will interrupt."
exit 0
fi
done
echo "The ${RELEASE_VERSION} tag was not found"