circleci: cleanup circle.yml

This commit is contained in:
Tom Gallacher 2016-10-31 14:51:21 +00:00
parent 08cecc66f7
commit 7be25cf921
3 changed files with 29 additions and 16 deletions

View File

@ -15,19 +15,6 @@ 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-"
echo ">> running triton deploy with docker-compose"
ensure_command triton
ensure_triton_cns_is_enabled

28
bin/push-images Executable file
View File

@ -0,0 +1,28 @@
#! /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-"

View File

@ -17,12 +17,9 @@ machine:
version: 6.9.1
dependencies:
cache_directories:
- "/opt/circleci/python/2.7.11/lib/python2.7/site-packages"
pre:
- sudo curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose -v
- yarn global add triton
- echo '{"url":"https://eu-ams-1.api.joyent.com","account":"'$SDC_ACCOUNT'","keyId":"c3:30:35:9b:85:48:73:44:31:cc:4b:2e:6a:00:16:e2","name":"eu-ams-1","curr":true}' | triton profile create -f -
- mkdir -p ${CIRCLE_TEST_REPORTS}/tap-xunit/
@ -37,6 +34,7 @@ deployment:
production: # just a label; label names are completely up to you
branch: master
commands:
- ./bin/push-images
- ./bin/deploy
## Custom notifications