Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(quickstart): use versioned docker images when on a release tag #2715

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docker/quickstart.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
#!/bin/bash

# Quickstarts DataHub by pulling all images from dockerhub and then running the containers locally. No images are
# built locally. Note: by default this pulls the latest (head) version; you can change this to a specific version by setting
# the DATAHUB_VERSION environment variable.
export DATAHUB_VERSION=${DATAHUB_VERSION:-head}
# built locally.
# Note: by default this pulls the latest (head) version or the tagged version if you checked out a release tag.
# You can change this to a specific version by setting the DATAHUB_VERSION environment variable.

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

# Detect if this is a checkout of a tagged branch.
# If this is a tagged branch, use the tag as the default, otherwise default to head.
# If DATAHUB_VERSION is set, it takes precedence.
TAG_VERSION=$(cd $DIR && git name-rev --name-only --tags HEAD)
DEFAULT_VERSION=$(echo $TAG_VERSION | sed 's/undefined/head/')
export DATAHUB_VERSION=${DATAHUB_VERSION:-${DEFAULT_VERSION}}

echo "Quickstarting DataHub: version ${DATAHUB_VERSION}"
cd $DIR && docker-compose pull && docker-compose -p datahub up