forked from vulcanize/vulcanizedb
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dockerhub via travis * add extract-diffs * add reset-header-check
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
|
||
function message() { | ||
echo | ||
echo ----------------------------------- | ||
echo "$@" | ||
echo ----------------------------------- | ||
echo | ||
} | ||
|
||
ENVIRONMENT=$1 | ||
if [ "$ENVIRONMENT" == "prod" ]; then | ||
TAG=latest | ||
elif [ "$ENVIRONMENT" == "staging" ]; then | ||
TAG=staging | ||
else | ||
message UNKNOWN ENVIRONMENT | ||
fi | ||
|
||
if [ -z "$ENVIRONMENT" ]; then | ||
echo 'You must specifiy an envionrment (bash deploy.sh <ENVIRONMENT>).' | ||
echo 'Allowed values are "staging" or "prod"' | ||
exit 1 | ||
fi | ||
|
||
message BUILDING HEADER-SYNC | ||
docker build -f dockerfiles/header_sync/Dockerfile . -t makerdao/vdb-headersync:$TAG | ||
|
||
message BUILDING EXTRACT-DIFFS | ||
docker build -f dockerfiles/extract_diffs/Dockerfile . -t makerdao/vdb-extract-diffs:$TAG | ||
|
||
message BUILDING RESET-HEADER-CHECK | ||
docker build -f dockerfiles/reset_header_check_count/Dockerfile . -t makerdao/vdb-reset-header-check:$TAG | ||
|
||
message LOGGING INTO DOCKERHUB | ||
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USER" --password-stdin | ||
|
||
message PUSHING HEADER-SYNC | ||
docker push makerdao/vdb-headersync:$TAG | ||
|
||
message PUSHING EXTRACT-DIFFS | ||
docker push makerdao/vdb-extract-diffs:$TAG | ||
|
||
message PUSHING RESET-HEADER-CHECK | ||
docker push makerdao/vdb-reset-header-check:$TAG | ||
|
||
# message DEPLOYING SERVICE |