2015-03-31 03:26:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Jenkins build steps
|
|
|
|
VERSION=$(git describe --always --abbrev=6)
|
|
|
|
ESCAPED_BRANCH_NAME=$(echo $sourceBranch | sed 's/[^a-z0-9A-Z_.-]/-/g')
|
|
|
|
|
2015-07-31 16:01:36 +00:00
|
|
|
# Try pulling the old build first for caching purposes.
|
|
|
|
docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin/${ARCH}-supervisor:master || true
|
|
|
|
|
2015-07-23 21:14:50 +00:00
|
|
|
# Test the gosuper
|
2015-07-28 21:10:17 +00:00
|
|
|
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
2015-07-23 21:14:50 +00:00
|
|
|
|
2015-03-31 03:26:09 +00:00
|
|
|
# Build the images
|
2015-10-14 19:53:33 +00:00
|
|
|
make SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} \
|
|
|
|
ARCH=${ARCH} \
|
|
|
|
JOB_NAME=${JOB_NAME} \
|
|
|
|
DEPLOY_REGISTRY= \
|
|
|
|
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
|
|
|
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
|
|
|
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
|
|
|
deploy
|
|
|
|
make SUPERVISOR_VERSION=${VERSION} \
|
|
|
|
ARCH=${ARCH} \
|
|
|
|
JOB_NAME=${JOB_NAME} \
|
|
|
|
DEPLOY_REGISTRY= \
|
|
|
|
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
|
|
|
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
|
|
|
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
|
|
|
deploy
|
2015-11-23 18:13:23 +00:00
|
|
|
make SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} \
|
|
|
|
ARCH=${ARCH} \
|
|
|
|
JOB_NAME=${JOB_NAME} \
|
|
|
|
DEPLOY_REGISTRY=registry.resinstaging.io/ \
|
|
|
|
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
|
|
|
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
|
|
|
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
|
|
|
deploy
|
|
|
|
make SUPERVISOR_VERSION=${VERSION} \
|
|
|
|
ARCH=${ARCH} \
|
|
|
|
JOB_NAME=${JOB_NAME} \
|
|
|
|
DEPLOY_REGISTRY=registry.resinstaging.io/ \
|
|
|
|
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
|
|
|
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
|
|
|
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
|
|
|
deploy
|