Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Added s390x support for docker image release #11548

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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