Skip to content

Commit f109d02

Browse files
authored
Merge pull request #3493 from CecileRobertMichon/windows-var
Build Windows k8s artifacts if TEST_WINDOWS or WINDOWS is set
2 parents 7425764 + 6138082 commit f109d02

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/ci-build-kubernetes.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ setup() {
6161
export KUBE_GIT_VERSION
6262
echo "using KUBE_GIT_VERSION=${KUBE_GIT_VERSION}"
6363

64+
# allow both TEST_WINDOWS and WINDOWS for backwards compatibility.
65+
export TEST_WINDOWS="${TEST_WINDOWS:-${WINDOWS:-}}"
66+
6467
# get the latest ci version for a particular release so that kubeadm is
6568
# able to pull existing images before being replaced by custom images
6669
major="$(echo "${KUBE_GIT_VERSION}" | ${GREP_BINARY} -Po "(?<=v)[0-9]+")"
@@ -113,7 +116,7 @@ main() {
113116
az storage blob upload --overwrite --container-name "${JOB_NAME}" --file "${KUBE_ROOT}/_output/dockerized/bin/linux/amd64/${BINARY}" --name "${KUBE_GIT_VERSION}/bin/linux/amd64/${BINARY}"
114117
done
115118

116-
if [[ "${WINDOWS:-}" == "true" ]]; then
119+
if [[ "${TEST_WINDOWS:-}" == "true" ]]; then
117120
echo "Building Kubernetes Windows binaries"
118121

119122
for BINARY in "${WINDOWS_BINARIES[@]}"; do
@@ -141,7 +144,7 @@ can_reuse_artifacts() {
141144
fi
142145
done
143146

144-
if [[ "${WINDOWS:-}" == "true" ]]; then
147+
if [[ "${TEST_WINDOWS:-}" == "true" ]]; then
145148
for BINARY in "${WINDOWS_BINARIES[@]}"; do
146149
if [[ "$(az storage blob exists --container-name "${JOB_NAME}" --name "${KUBE_GIT_VERSION}/bin/windows/amd64/${BINARY}.exe" --query exists)" == "false" ]]; then
147150
echo "false" && return

0 commit comments

Comments
 (0)