mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 10:38:55 +00:00
47 lines
1.4 KiB
Bash
Executable File
47 lines
1.4 KiB
Bash
Executable File
#!/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')
|
|
|
|
# Try pulling the old build first for caching purposes.
|
|
docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin/${ARCH}-supervisor:master || true
|
|
|
|
# Test the gosuper
|
|
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
|
|
|
# Build the images
|
|
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
|
|
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
|