Browse Source

scripts: fix build docker commands, add more logging

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Gyuho Lee 6 years ago
parent
commit
ac613c481f
2 changed files with 10 additions and 1 deletions
  1. 1 1
      scripts/build-release.sh
  2. 9 0
      scripts/release

+ 1 - 1
scripts/build-release.sh

@@ -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

+ 9 - 0
scripts/release

@@ -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.