Skip to content

Commit

Permalink
Merge pull request #11548 from linux-on-ibm-z/s390x-docker
Browse files Browse the repository at this point in the history
scripts: Added s390x support for docker image release
  • Loading branch information
gyuho authored Feb 6, 2020
2 parents 6b17141 + 17a220e commit aea3354
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Dockerfile-release.s390x
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion etcdmain/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit aea3354

Please sign in to comment.