mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
a93741e64b
* Make sure master builds tarball/docker image only when backend and frontend tests pass. * Build a redash/preview image alongside redash/redash image. * Fix version variable
17 lines
496 B
Bash
Executable File
17 lines
496 B
Bash
Executable File
#!/bin/bash
|
|
VERSION=$(jq -r .version package.json)
|
|
VERSION_TAG=$VERSION.b$CIRCLE_BUILD_NUM
|
|
|
|
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
|
|
|
|
echo "Built: $VERSION_TAG" |