Sha256: d25fa06f7e70d0b2354afa84cf1727feb5ef2a60c627834de6ea4058a151d9ad

Contents?: true

Size: 998 Bytes

Versions: 17

Compression:

Stored size: 998 Bytes

Contents

#!/usr/bin/env bash
set -e

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null && pwd)"
IMAGE_PREFIX=${IMAGE_PREFIX:-"riemannio/"}

function getVersion {
	local path=$ROOT_DIR
	[ -z "$1" ] || path="$ROOT_DIR/tools/$1"
	cat $path/Rakefile.rb | grep s.version | grep -oE '[0-9.]{5,}'
}

function getPackageList {
	echo -n "riemann-tools:`getVersion`"
	[ -z "$1" ] || echo -n " $1:`getVersion $1`"
}

# Need to log in before we can push.
[ -z "$DOCKER_USER" ] && echo "DOCKER_USER is not set" && exit 1
[ -z "$DOCKER_PASS" ] && echo "DOCKER_PASS is not set" && exit 1
docker login -u $DOCKER_USER -p $DOCKER_PASS

tool=${EXTRA_TOOL:-""}
version=`getVersion $tool`
name=${IMAGE_PREFIX}riemann-tools${tool/riemann/}

echo "==> Publishing $name:$version and :latest"
docker pull $name:latest
docker build --cache-from $name:latest \
	--build-arg RUBY_GEMS="`getPackageList $tool`" \
	-t $name:$version -t $name:latest \
	$ROOT_DIR/.docker

docker push $name:$version
docker push $name:latest

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
riemann-tools-1.11.0 .docker/publish.sh
riemann-tools-1.10.0 .docker/publish.sh
riemann-tools-1.9.1 .docker/publish.sh
riemann-tools-1.9.0 .docker/publish.sh
riemann-tools-1.8.2 .docker/publish.sh
riemann-tools-1.8.1 .docker/publish.sh
riemann-tools-1.8.0 .docker/publish.sh
riemann-tools-1.7.1 .docker/publish.sh
riemann-tools-1.7.0 .docker/publish.sh
riemann-tools-1.6.0 .docker/publish.sh
riemann-tools-1.5.0 .docker/publish.sh
riemann-tools-1.4.0 .docker/publish.sh
riemann-tools-1.3.0 .docker/publish.sh
riemann-tools-1.2.0 .docker/publish.sh
riemann-tools-1.1.1 .docker/publish.sh
riemann-tools-1.1.0 .docker/publish.sh
riemann-tools-1.0.0 .docker/publish.sh