Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 659 Bytes
#!/bin/bash
if [ -f "$VRSNFILE" ]; then
# Get new image version from update-generated file and build new image.
tag=$(cat "$VRSNFILE")
echo "Image gcr.io/${PROJECT}/${IMGNAME}:${tag} NOT found. Building new..."
docker build -t "gcr.io/${PROJECT}/${IMGNAME}:${tag}" -t "gcr.io/${PROJECT}/${IMGNAME}" -f "$DCRFILE" .
docker push "gcr.io/${PROJECT}/${IMGNAME}:${tag}"
docker push "gcr.io/${PROJECT}/${IMGNAME}"
else
# Get image version from Dockerfile
line=$(sed -n -e "/$SEARCHSTR /p" "$DCRFILE")
tag=$(echo "${line##* }")
echo "Image gcr.io/${PROJECT}/${IMGNAME}:$tag exists in GCR, proceeding without new build..."
fi
You can’t perform that action at this time.