Skip to content

Commit edcc550

Browse files
authored
Cleanup obsolete image pushing (#4748)
Two parts: * Cleanup DOCKER_REPOSITORY, which is strictly dead code * Cleanup WASM_REPOSITORY, which is used to push WASM images. This has moved to istio-ecosystem
1 parent 141fa88 commit edcc550

File tree

5 files changed

+2
-51
lines changed

5 files changed

+2
-51
lines changed

Makefile.core.mk

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ TOP := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
1717
SHELL := /bin/bash
1818
BAZEL_STARTUP_ARGS ?=
1919
BAZEL_BUILD_ARGS ?=
20-
BAZEL_TARGETS ?= //... \
21-
-extensions:metadata_exchange.wasm \
22-
-extensions:push_wasm_image_metadata_exchange \
23-
-extensions:wasm_image_metadata_exchange \
24-
-extensions:copy_original_file_metadata_exchange
20+
BAZEL_TARGETS ?= //... -extensions:metadata_exchange.wasm
2521
# Don't build Debian packages and Docker images in tests.
2622
BAZEL_TEST_TARGETS ?= ${BAZEL_TARGETS}
2723
E2E_TEST_TARGETS ?= $$(go list ./...)

bazel/bazel_get_workspace_status

-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@ fi
3535
echo "BUILD_SCM_REVISION ${BUILD_SCM_REVISION}"
3636
echo "BUILD_SCM_STATUS ${BUILD_SCM_STATUS}"
3737
echo "BUILD_CONFIG ${BUILD_CONFIG:-default}"
38-
echo "DOCKER_REPOSITORY ${DOCKER_REPOSITORY:-istio-testing/envoy}"
39-
echo "WASM_REPOSITORY ${WASM_REPOSITORY:-istio-testing/wasm}"

bazel/wasm.bzl

-23
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
#
1717

1818
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
19-
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
20-
load(
21-
"@io_bazel_rules_docker//container:container.bzl",
22-
"container_image",
23-
"container_push",
24-
)
2519

2620
def wasm_dependencies():
2721
FLAT_BUFFERS_SHA = "a83caf5910644ba1c421c002ef68e42f21c15f9f"
@@ -40,20 +34,3 @@ def wasm_dependencies():
4034
"https://github.com/nlohmann/json/releases/download/v3.7.3/json.hpp",
4135
],
4236
)
43-
44-
def declare_wasm_image_targets(name, wasm_file, docker_registry, tag, pkg):
45-
tmpdir = "tmp-" + name
46-
plugin_file = tmpdir + "/plugin.wasm"
47-
copy_file("copy_original_file_" + name, wasm_file, plugin_file)
48-
container_image(
49-
name = "wasm_image_" + name,
50-
files = [pkg + ":" + plugin_file],
51-
)
52-
container_push(
53-
name = "push_wasm_image_" + name,
54-
format = "OCI",
55-
image = ":wasm_image_" + name,
56-
registry = "gcr.io",
57-
repository = docker_registry + "/" + name,
58-
tag = tag,
59-
)

extensions/BUILD

-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ load(
2323
"@envoy//bazel:envoy_build_system.bzl",
2424
"envoy_package",
2525
)
26-
load("//bazel:wasm.bzl", "declare_wasm_image_targets")
2726

2827
envoy_package()
2928

@@ -57,11 +56,3 @@ envoy_wasm_cc_binary(
5756
"@proxy_wasm_cpp_sdk//contrib:contrib_lib",
5857
],
5958
)
60-
61-
declare_wasm_image_targets(
62-
name = "metadata_exchange",
63-
docker_registry = "{WASM_REPOSITORY}",
64-
pkg = "//extensions",
65-
tag = "{BUILD_SCM_REVISION}",
66-
wasm_file = ":metadata_exchange.wasm",
67-
)

scripts/release-binary.sh

+1-12
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ BASE_BINARY_NAME="${BASE_BINARY_NAME:-"envoy"}"
5454
# If enabled, we will just build the Envoy binary rather than wasm, etc
5555
BUILD_ENVOY_BINARY_ONLY="${BUILD_ENVOY_BINARY_ONLY:-0}"
5656

57-
# Push envoy docker image.
58-
PUSH_DOCKER_IMAGE=0
59-
6057
# Support CentOS builds
6158
BUILD_FOR_CENTOS=0
6259

@@ -65,17 +62,14 @@ function usage() {
6562
-d The bucket name to store proxy binary (optional).
6663
If not provided, both envoy binary push and docker image push are skipped.
6764
-i Skip Ubuntu Xenial check. DO NOT USE THIS FOR RELEASED BINARIES.
68-
-c Build for CentOS releases. This will disable the Ubuntu Xenial check.
69-
-p Push wasm oci image.
70-
Registry is hard coded to gcr.io and repository is controlled via DOCKER_REPOSITORY and WASM_REPOSITORY env var."
65+
-c Build for CentOS releases. This will disable the Ubuntu Xenial check."
7166
exit 1
7267
}
7368

7469
while getopts d:ipc arg ; do
7570
case "${arg}" in
7671
d) DST="${OPTARG}";;
7772
i) CHECK=0;;
78-
p) PUSH_DOCKER_IMAGE=1;;
7973
c) BUILD_FOR_CENTOS=1;;
8074
*) usage;;
8175
esac
@@ -190,11 +184,6 @@ trap 'rm -rf ${TMP_WASM}' EXIT
190184
make build_wasm
191185
if [ -n "${DST}" ]; then
192186
for extension in "${extensions[@]}"; do
193-
if [ "${PUSH_DOCKER_IMAGE}" -eq 1 ]; then
194-
echo "Pushing Wasm OCI image for ${extension}"
195-
# shellcheck disable=SC2086
196-
bazel run ${BAZEL_BUILD_ARGS} ${CONFIG_PARAMS} //extensions:push_wasm_image_${extension}
197-
fi
198187
# Rename the plugin file and generate sha256 for it
199188
WASM_NAME="${extension}-${SHA}.wasm"
200189
WASM_COMPILED_NAME="${extension}-${SHA}.compiled.wasm"

0 commit comments

Comments
 (0)