scripts: Added s390x support for docker image release

release-3.5
Nirman Narang 2020-01-20 07:09:59 -08:00
parent c00e929d8f
commit 17a220eaee
4 changed files with 14 additions and 3 deletions

11
Dockerfile-release.s390x Normal file
View File

@ -0,0 +1,11 @@
FROM k8s.gcr.io/debian-base-s390x:v1.0.0
ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
ADD var/etcd /var/etcd
ADD var/lib/etcd /var/lib/etcd
EXPOSE 2379 2380
# Define default command.
CMD ["/usr/local/bin/etcd"]

View File

@ -603,7 +603,7 @@ func identifyDataDirOrDie(lg *zap.Logger, dir string) dirType {
func checkSupportArch() {
// TODO qualify arm64
if runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64le" {
if runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x" {
return
}
// unsupported arch only configured via environment variable

View File

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

View File

@ -200,7 +200,7 @@ main() {
echo "Pushing container images to gcr.io ${RELEASE_VERSION}"
gcloud docker -- push "gcr.io/etcd-development/etcd:${RELEASE_VERSION}"
for TARGET_ARCH in "-arm64" "-ppc64le"; do
for TARGET_ARCH in "-arm64" "-ppc64le" "-s390x"; do
echo "Pushing container images to quay.io ${RELEASE_VERSION}${TARGET_ARCH}"
docker push "quay.io/coreos/etcd:${RELEASE_VERSION}${TARGET_ARCH}"