Skip to content

Commit

Permalink
Merge pull request #2763 from weaveworks/release-1.6
Browse files Browse the repository at this point in the history
push release images to quay.io

Fixes #2762.
  • Loading branch information
rade authored Jul 28, 2017
2 parents b0ae4c0 + 561a211 commit 43b60ef
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,12 @@ draft() {
}

publish() {
local IMAGES="scope cloud-agent"
setup
cd "$PWD"/"$RELEASE_DIR"

if [ "$RELEASE_TYPE" = 'PRERELEASE' ]; then
echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
for IMAGE in $IMAGES; do
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE" "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:latest_release"
done
push_images
echo "** Docker images tagged and pushed"

echo "== Publishing pre-release on GitHub"
Expand Down Expand Up @@ -204,12 +198,7 @@ publish() {
echo '** Sanity checks OK for publishing tag' "$LATEST_TAG" as "$DOCKERHUB_USER/scope:$VERSION"

echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
for IMAGE in $IMAGES; do
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE" "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:latest_release"
done
push_images
echo "** Docker images tagged and pushed"

echo "== Publishing release on GitHub"
Expand Down Expand Up @@ -247,6 +236,17 @@ publish() {
fi
}

push_images() {
for IMAGE in "scope" "cloud-agent"; do
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE" "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "quay.io/$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "quay.io/$DOCKERHUB_USER/$IMAGE:$VERSION"
done
}

usage() {
echo "Usage:"
echo -e "\t./bin/release build"
Expand Down

0 comments on commit 43b60ef

Please sign in to comment.