29 lines
964 B
Bash
Executable File
29 lines
964 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
#
|
|
# Prelude - make bash behave sanely
|
|
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
#
|
|
set -euo pipefail
|
|
|
|
# Beware of CDPATH gotchas causing cd not to work correctly when a user
|
|
# has set this in their environment
|
|
# https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
|
|
unset CDPATH
|
|
|
|
readonly INCLUDE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
# shellcheck source=bin/setup-tools
|
|
. "${INCLUDE}"/setup-tools
|
|
|
|
echo ">> Logging into $_DOCKER_REGISTRY"
|
|
docker login -e="." -u="$_DOCKER_LOGIN_USERNAME" -p="$_DOCKER_LOGIN_PASSWORD" "$_DOCKER_REGISTRY"
|
|
echo ">> Installing captain"
|
|
curl -sSL https://raw.githubusercontent.com/tomgco/captain/master/install.sh | bash
|
|
export PATH=$HOME/.captain/bin:$PATH
|
|
|
|
git stash -u
|
|
echo ">> running captain build"
|
|
captain build -N "$_DOCKER_REGISTRY/yldio/joyent-dashboard-"
|
|
echo ">> running captain push"
|
|
captain push -N "$_DOCKER_REGISTRY/yldio/joyent-dashboard-"
|