Skip to content

Commit 58eef32

Browse files
committed
fix: restore local runner image tags for ci scans
1 parent 1d77fa4 commit 58eef32

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

images/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ build_image() {
7878
fi
7979
}
8080

81+
tag_local_aliases() {
82+
local source_image=$1
83+
local local_name=$2
84+
85+
if [[ "${MULTI_PLATFORM}" != "true" ]]; then
86+
docker tag "${source_image}" "${local_name}:latest"
87+
fi
88+
}
89+
8190
echo "build runner base"
8291
build_image "${RUNNER_BASE_IMAGE}" images/pulsar-functions-base-runner \
8392
--build-arg PULSAR_IMAGE="${PULSAR_IMAGE}" \
@@ -88,6 +97,8 @@ build_image "${PULSARCTL_RUNNER_BASE_IMAGE}" images/pulsar-functions-base-runner
8897
--build-arg PULSAR_IMAGE="${PULSAR_IMAGE}" \
8998
--build-arg PULSAR_IMAGE_TAG="${PULSAR_IMAGE_TAG}" \
9099
--progress=plain
100+
tag_local_aliases "${RUNNER_BASE_IMAGE}" "${RUNNER_BASE}"
101+
tag_local_aliases "${PULSARCTL_RUNNER_BASE_IMAGE}" "${PULSARCTL_RUNNER_BASE}"
91102

92103
echo "build java runner"
93104
build_image "${JAVA_RUNNER_IMAGE}" images/pulsar-functions-java-runner \
@@ -101,6 +112,8 @@ build_image "${PULSARCTL_JAVA_RUNNER_IMAGE}" images/pulsar-functions-java-runner
101112
--build-arg PULSAR_IMAGE="${PULSAR_IMAGE}" \
102113
--build-arg PULSAR_IMAGE_TAG="${PULSAR_IMAGE_TAG}" \
103114
--progress=plain
115+
tag_local_aliases "${JAVA_RUNNER_IMAGE}" "${JAVA_RUNNER}"
116+
tag_local_aliases "${PULSARCTL_JAVA_RUNNER_IMAGE}" "${PULSARCTL_JAVA_RUNNER}"
104117

105118
echo "build python runner"
106119
build_image "${PYTHON_RUNNER_IMAGE}" images/pulsar-functions-python-runner \
@@ -114,6 +127,8 @@ build_image "${PULSARCTL_PYTHON_RUNNER_IMAGE}" images/pulsar-functions-python-ru
114127
--build-arg PULSAR_IMAGE_TAG="${PULSAR_IMAGE_TAG}" \
115128
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
116129
--progress=plain
130+
tag_local_aliases "${PYTHON_RUNNER_IMAGE}" "${PYTHON_RUNNER}"
131+
tag_local_aliases "${PULSARCTL_PYTHON_RUNNER_IMAGE}" "${PULSARCTL_PYTHON_RUNNER}"
117132

118133
echo "build go runner"
119134
build_image "${GO_RUNNER_IMAGE}" images/pulsar-functions-go-runner \
@@ -123,6 +138,8 @@ build_image "${PULSARCTL_GO_RUNNER_IMAGE}" images/pulsar-functions-go-runner \
123138
-f images/pulsar-functions-go-runner/pulsarctl.Dockerfile \
124139
--build-arg BASE_IMAGE="${PULSARCTL_RUNNER_BASE_IMAGE}" \
125140
--progress=plain
141+
tag_local_aliases "${GO_RUNNER_IMAGE}" "${GO_RUNNER}"
142+
tag_local_aliases "${PULSARCTL_GO_RUNNER_IMAGE}" "${PULSARCTL_GO_RUNNER}"
126143

127144
if [ "$KIND_PUSH" = true ] ; then
128145
echo "push images to kind"

0 commit comments

Comments
 (0)