File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,18 @@ capz::util::should_build_kubernetes() {
4242}
4343
4444capz::util::should_build_ccm () {
45+ # TEST_CCM is an environment variable set by a prow job to indicate that the CCM should be built and tested.
4546 if [[ -n " ${TEST_CCM:- } " ]]; then
4647 echo " true" && return
4748 fi
49+ # If conformance is being tested with CI artifacts, CCM should be built.
4850 if [[ " ${E2E_ARGS:- } " == " -kubetest.use-ci-artifacts" ]]; then
4951 echo " true" && return
5052 fi
53+ # If the Kubernetes version contains "latest", CCM should be built.
54+ if [[ " ${KUBERNETES_VERSION:- } " =~ " latest" ]]; then
55+ echo " true" && return
56+ fi
5157 echo " false"
5258}
5359
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ setup() {
5050 # setup REGISTRY for custom images.
5151 : " ${REGISTRY:? Environment variable empty or not defined.} "
5252 " ${REPO_ROOT} /hack/ensure-acr-login.sh"
53- if [[ -n " ${TEST_CCM :- } " ]]; then
53+ if [[ " $( capz::util::should_build_ccm ) " == " true " ]]; then
5454 # shellcheck source=scripts/ci-build-azure-ccm.sh
5555 source " ${REPO_ROOT} /scripts/ci-build-azure-ccm.sh"
5656 echo " Will use the ${IMAGE_REGISTRY} /${CCM_IMAGE_NAME} :${IMAGE_TAG} cloud-controller-manager image for external cloud-provider-cluster"
You can’t perform that action at this time.
0 commit comments