Sha256: 92a6a2201882f5c4fe6c27430493a51ff2281cacea4b54898167d8dfa698faaf

Contents?: true

Size: 894 Bytes

Versions: 1

Compression:

Stored size: 894 Bytes

Contents

#!/usr/bin/env sh
set -eux
#set -o pipefail

_init_env() {
  # leading colon force successful return code
  : ${PUBLISH:=0} # If unset, default to 0
  : ${REGISTRY:=docker.sendgrid.net}
  : ${NAMESPACE:=${USER}}
  : ${APPNAME=gridium}
  : ${COMPOSE_PROJECT_NAME:=$APPNAME}

  # If we're "jenkins" and on the "origin/master" branch, push to 'docker.sendgrid.net/sendgrid'
  [[ "${USER}" == "jenkins" ]] && [[ "${GIT_BRANCH}" == "origin/master" ]] && NAMESPACE=sendgrid

  export PUBLISH
  export REGISTRY
  export NAMESPACE
  export APPNAME
  export COMPOSE_PROJECT_NAME

}

run_test(){
  docker exec $(docker-compose ps -q gridium) rake spec
}

main() {
  echo "**** Arguments: $@"

  # Cleanup regardless
  trap bin/cleanup EXIT

  _init_env

  if [[ "${SKIPDOCKERPULL:=0}" -eq 1 ]]; then
    echo "Skipping docker pull"
  else
    bin/pull
  fi

  bin/start -i
  sleep 2

  run_test
}


main

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gridium-1.0.1 .jenkins-docker