statuper shell script - travis upload to S3

pull/78/head
Hunter Long 2018-10-04 22:02:51 -07:00
parent ddb2a10a7c
commit 7241040146
3 changed files with 29 additions and 9 deletions

View File

@ -32,6 +32,24 @@ env:
- GO_ENV=test
- STATUP_DIR=$GOPATH/src/github.com/hunterlong/statup
before_deploy:
- mv statuper build/statuper
- git config --local user.name "hunterlong"
- git config --local user.email "info@socialeck.com"
- make tag
deploy:
- provider: releases
api_key: $GH_TOKEN
skip_cleanup: true
- provider: s3
access_key_id: $AWS_KEY
secret_access_key: $AWS_SECRET
bucket: "assets.statup.io"
local_dir: build
region: us-west-2
skip_cleanup: true
matrix:
allow_failures:
- go: master
@ -42,7 +60,7 @@ notifications:
branches:
except:
- /^v\d/
- /^v\d/
before_install:
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep

View File

@ -1,4 +1,4 @@
VERSION=0.72
VERSION=0.73
BINARY_NAME=statup
GOPATH:=$(GOPATH)
GOCMD=go

View File

@ -8,7 +8,10 @@ US_W_2="ami-7be8a103"
US_E_1="ami-7be8a103"
US_E_2="ami-7be8a103"
AWS_CLI=$(which aws)
DOCKER_CLI=$(which docker)
DOCKER_IMG="hunterlong/statup"
AWS_ECS="$AWS_CLI --output json"
DOCKER_PORT=8080
function usage() {
cat <<EOM
@ -154,11 +157,8 @@ function localTask {
}
function dockerTask {
echo "installing docker"
}
function dockerComposeTask {
echo "installing docker compose"
echo "Starting Statup Docker container on port $DOCKER_PORT"
$DOCKER_CLI run -d -p $DOCKER_PORT:8080 $DOCKER_IMG
}
if [ "$BASH_SOURCE" == "$0" ]; then
@ -175,7 +175,6 @@ if [ "$BASH_SOURCE" == "$0" ]; then
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-k|--aws-access-key)
AWS_ACCESS_KEY_ID="$2"
@ -189,12 +188,15 @@ if [ "$BASH_SOURCE" == "$0" ]; then
AWS_DEFAULT_REGION="$2"
shift # past argument
;;
-p|--port)
DOCKER_PORT="$2"
shift # past argument
;;
-x|--verbose)
VERBOSE=true
;;
-v|--version)
echo ${VERSION}
echo "$2"
usage
exit 2
exit 0