Refine docker image tagging to avoid breaking stabilization branches on updates

This commit is contained in:
Michael Vines
2018-09-07 16:41:55 -07:00
parent 73a8441add
commit b1b03ec13b
6 changed files with 25 additions and 17 deletions

View File

@@ -2,11 +2,12 @@
cd "$(dirname "$0")"
docker build -t solanalabs/rust-nightly .
nightlyDate=${1:-$(date +%Y-%m-%d)}
docker build -t solanalabs/rust-nightly:"$nightlyDate" --build-arg date="$nightlyDate" .
maybeEcho=
if [[ -z $CI ]]; then
echo "Not CI, skipping |docker push|"
maybeEcho="echo"
fi
$maybeEcho docker push solanalabs/rust-nightly
$maybeEcho docker push solanalabs/rust-nightly:"$nightlyDate"