Skip to content

Instantly share code, notes, and snippets.

@dataday
Last active August 24, 2017 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dataday/04f307d0113873f9a27107632c451fc0 to your computer and use it in GitHub Desktop.
Save dataday/04f307d0113873f9a27107632c451fc0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#
# Author: dataday
# created: 23/02/2016
#
# Description:
# Runs release (delivery pipeline) or
# development tasks locally or on CI
#
# fail on error
set -e
SCRIPT_NAME=${BASH_SOURCE##*/}
SCRIPT_ROOT=${BASH_SOURCE[0]%/*}
DEBUG=true
BUILD=true
REBUILD=false
TARGET_ENV=${TARGET_ENV:-int}
CONTAINER=project
# determine build type and target
[ "$REBUILD" = true ] && opts="$opts --rebuild" || opts="$opts --build"
# debug
[ "$DEBUG" = true ] && opts="$opts --debug"
# init
eval $(docker-machine env sandbox)
# debug
env
docker ps -a
# DEVELOPMENT
#############################################################################
# https://github.com/domain/project//blob/int/infrastructure/README.md
# https://github.com/domain/project//blob/int/infrastructure/README.md
# https://github.com/domain/project//tree/int/infrastructure/src/README.md
# uncomment to test a development build / rebuild
#############################################################################
# task build/rebuild
#$SCRIPT_ROOT/sandbox/run $opts
# task --status=restart
#$SCRIPT_ROOT/sandbox/run --status=restart
# task --clean=cache
#$SCRIPT_ROOT/sandbox/run --clean=cache
# task --login=$container
#$SCRIPT_ROOT/sandbox/run --login=$CONTAINER
# RELEASE (CI)
#############################################################################
# https://github.com/domain/project/blob/int/RELEASE.md
# uncomment to test a release
#############################################################################
# triggers seperate pipeline tasks
# triggers in sequence
# task 1 build/rebuild
#$SCRIPT_ROOT/release $opts
# task 2 --package=translations
#$SCRIPT_ROOT/release --package=translations
# task 3 -test
#$SCRIPT_ROOT/release --test
# task 4 --sniff
#$SCRIPT_ROOT/release --sniff
# task 5 --package=rpm
#$SCRIPT_ROOT/release --package=rpm
# task 6 --deploy=assets
#$SCRIPT_ROOT/release --deploy=assets
# task 7 --deploy=repositories
#$SCRIPT_ROOT/release --deploy=repositories
# task 8 --deploy=rpm
#$SCRIPT_ROOT/release --deploy=rpm
# task 9 --promote=(int|test|live)
#$SCRIPT_ROOT/release --promote=$TARGET_ENV
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment