forked from getredash/redash
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
706fae7
commit 052116a
Showing
4 changed files
with
74 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
#!/bin/bash | ||
VERSION=$(jq -r .version package.json) | ||
VERSION_TAG=$VERSION.b$CIRCLE_BUILD_NUM | ||
VERSION_TAG="$1" | ||
|
||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
|
||
if [ $CIRCLE_BRANCH = master ] || [ $CIRCLE_BRANCH = preview-image ] | ||
then | ||
docker build -t redash/redash:preview -t redash/preview:$VERSION_TAG . | ||
docker push redash/redash:preview | ||
docker push redash/preview:$VERSION_TAG | ||
else | ||
docker build -t redash/redash:$VERSION_TAG . | ||
docker push redash/redash:$VERSION_TAG | ||
fi | ||
docker build -t $DOCKERHUB_REPO:$VERSION_TAG . | ||
docker push $DOCKERHUB_REPO:$VERSION_TAG | ||
|
||
echo "Built: $VERSION_TAG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
MOZILLA_VERSION="$1" | ||
bin/dockerflow-version "$MOZILLA_VERSION" | ||
|
||
VERSION=$(jq -r .version package.json) | ||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM | ||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM-$MOZILLA_VERSION | ||
|
||
sed -ri "s/^__version__ = '([A-Za-z0-9.-]*)'/__version__ = '$FULL_VERSION'/" redash/__init__.py | ||
sed -i "s/dev/$CIRCLE_SHA1/" client/app/version.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
VERSION="$1" | ||
|
||
printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' \ | ||
"$CIRCLE_SHA1" \ | ||
"$VERSION" \ | ||
"$CIRCLE_PROJECT_USERNAME" \ | ||
"$CIRCLE_PROJECT_REPONAME" \ | ||
"$CIRCLE_BUILD_URL" \ | ||
> version.json |