scripts: fix build docker commands, add more logging

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
This commit is contained in:
Gyuho Lee 2019-08-12 09:48:57 -07:00
parent 7299a6a106
commit ac613c481f
2 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,6 @@ pushd "${ETCD_ROOT}" >/dev/null
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do
echo Building ${TARGET_ARCH} docker image...
GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker "${VERSION}"
GOOS=linux GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker "${VERSION}"
done
popd >/dev/null

View File

@ -163,14 +163,23 @@ main() {
done
gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
echo "Pushing container images to quay.io" ${RELEASE_VERSION}
docker push quay.io/coreos/etcd:${RELEASE_VERSION}
echo "Pushing container images to gcr.io" ${RELEASE_VERSION}
gcloud docker -- push gcr.io/etcd-development/etcd:${RELEASE_VERSION}
if [ "${MINOR_VERSION}" != "3.1" ]; then
for TARGET_ARCH in "-arm64" "-ppc64le"; do
echo "Pushing container images to quay.io" ${RELEASE_VERSION}${TARGET_ARCH}
docker push quay.io/coreos/etcd:${RELEASE_VERSION}${TARGET_ARCH}
echo "Pushing container images to gcr.io" ${RELEASE_VERSION}${TARGET_ARCH}
gcloud docker -- push gcr.io/etcd-development/etcd:${RELEASE_VERSION}${TARGET_ARCH}
done
fi
echo "Setting permissions using gsutil..."
gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
# TODO: upload minor versions: v3.1, v3.2, v3.3, etc.