From a6fc0e3fc42fd4ae1bb0659f33ef3e73b16ecafe Mon Sep 17 00:00:00 2001 From: John Payne <89417863+jpayne3506@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:16:32 -0700 Subject: [PATCH] [backport] CI/CD changes to PR and CNI Release Test Pipelines (#2940) * ci: Add node restart to cniv2 E2E (#2901) * ci: add node restart to cniv2 E2E * chore: change directory after scale * chore: fixup nodepool * chore: pipeline cleanup * ci: cleanup test resources * chore: address comments * [FIX] ci: Update AzCLI task to v2 (#2922) * ci: Update AzCLI task to v2 * ci: add scriptType: "bash" * ci: Shift E2E cluster creation (#2862) * ci: shift cluster creation * chore: change depends on for release test --- .../cilium-overlay-load-test-template.yaml | 9 +- .pipelines/cni/cilium/cilium-scale-test.yaml | 52 +++++------ .../cni/cilium/nightly-release-test.yml | 9 +- .../cni/k8s-e2e/k8s-e2e-job-template.yaml | 2 +- .../create-cluster-template.yaml | 2 +- .../pod-deployment-template.yaml | 2 +- .../restart-cns-template.yaml | 2 +- .../restart-hns-template.yaml | 2 +- .../restart-node-template.yaml | 2 +- .../validate-state-template.yaml | 2 +- .../cni/lsg/kernel-upgrade-template.yaml | 2 +- .../lsg/lsg-cni-intergration-template.yaml | 10 +-- .pipelines/cni/pipeline.yaml | 2 +- .../cni/singletenancy/cniv1-template.yaml | 8 +- .../cni/singletenancy/cniv2-template.yaml | 10 ++- .pipelines/containers/container-template.yaml | 6 +- .pipelines/containers/manifest-template.yaml | 6 +- .../swiftv2-e2e-step-template.yaml | 2 +- .pipelines/networkobservability/pipeline.yaml | 8 +- .pipelines/npm/npm-conformance-tests.yaml | 2 +- .pipelines/pipeline.yaml | 22 ++--- .../aks-swift/e2e-job-template.yaml | 1 + .../aks-swift/e2e-step-template.yaml | 39 ++++++++- .../singletenancy/aks/e2e-step-template.yaml | 12 ++- .../azure-cni-overlay-e2e-job-template.yaml | 34 +++++++- .../azure-cni-overlay-e2e-step-template.yaml | 85 ++++++++++-------- ...ium-dualstackoverlay-e2e-job-template.yaml | 1 + ...um-dualstackoverlay-e2e-step-template.yaml | 41 ++++++++- .../cilium-overlay-e2e-job-template.yaml | 1 + .../cilium-overlay-e2e-step-template.yaml | 41 ++++++++- .../cilium-overlay-e2e-job-template.yaml | 1 + .../cilium-overlay-e2e-step-template.yaml | 42 ++++++++- .../cilium/cilium-e2e-job-template.yaml | 1 + .../cilium/cilium-e2e-step-template.yaml | 54 ++++++++---- .../dualstackoverlay-e2e-job-template.yaml | 33 ++++++- .../dualstackoverlay-e2e-step-template.yaml | 86 ++++++++++--------- .../templates/create-cluster-swiftv2.yaml | 2 +- .pipelines/templates/create-cluster.yaml | 2 +- .pipelines/templates/delete-cluster.yaml | 2 +- .pipelines/templates/log-template.yaml | 2 +- 40 files changed, 453 insertions(+), 189 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 8f5ee32452..8c47a513c0 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -28,6 +28,7 @@ stages: commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ] dependsOn: - setup + - build_images displayName: "Create Cluster - ${{ parameters.clusterName }}" jobs: - job: create_aks_cluster_with_${{ parameters.name }} @@ -68,7 +69,7 @@ stages: - job: deploy_cilium_components displayName: Deploy Cilium steps: - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Install Cilium, CNS, and ip-masq-agent" inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) @@ -105,7 +106,7 @@ stages: kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-agent/files kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-operator/files - envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset.yaml | kubectl apply -f - + envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset.yaml | kubectl apply -f - envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A @@ -116,7 +117,7 @@ stages: - job: deploy_cilium_components displayName: Deploy Cilium with Hubble steps: - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Install Cilium, CNS, and ip-masq-agent" inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) @@ -197,7 +198,7 @@ stages: dependsOn: restart_cns steps: - template: ../../templates/cilium-cli.yaml - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/cilium/cilium-scale-test.yaml b/.pipelines/cni/cilium/cilium-scale-test.yaml index 45a17da9d2..5691f858b5 100644 --- a/.pipelines/cni/cilium/cilium-scale-test.yaml +++ b/.pipelines/cni/cilium/cilium-scale-test.yaml @@ -9,7 +9,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -27,12 +27,12 @@ stages: kubectl apply -f test/integration/manifests/cilium/cilium-operator echo "Keep CNS version up to date, grabbing pipeline parameter" CNS_IMAGE=${CNS_IMAGE} - sed -i '/containers:/{n;n;s/\(image\).*/\1: '"${CNS_IMAGE//\//\\/}"'/}' test/integration/manifests/cns/daemonset.yaml - kubectl apply -f test/integration/manifests/cns/daemonset.yaml + sed -i '/containers:/{n;n;s/\(image\).*/\1: '"${CNS_IMAGE//\//\\/}"'/}' test/integration/manifests/cns/daemonset.yaml + kubectl apply -f test/integration/manifests/cns/daemonset.yaml for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} done - kubectl get node + kubectl get node kubectl get pod -A name: "UpdateCiliumandCNSVersion" displayName: "Update Cilium and CNS Version" @@ -43,7 +43,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -63,7 +63,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -72,7 +72,7 @@ stages: inlineScript: | echo "Set node label scale-test=true and connectivity-test=true for testing" az aks get-credentials --resource-group ${CLUSTER} --name ${CLUSTER} - cd test/scale + cd test/scale chmod +x label-nodes.sh ./label-nodes.sh name: "LabelNodes" @@ -84,7 +84,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -95,14 +95,14 @@ stages: echo "collect cpu and memory usage before scaling for network policies" mkdir test1_1_netpol_cpu_and_mem_before cd test1_1_netpol_cpu_and_mem_before - echo "running k top node" + echo "running k top node" kubectl top node >> "node_before_netpol_scale.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_before_netpol_scale.log" echo "Logs will be available as a build artifact" ARTIFACT_DIR=$(Build.ArtifactStagingDirectory)/test1_1_netpol_cpu_and_mem_before/ echo $ARTIFACT_DIR - sudo rm -rf $ARTIFACT_DIR + sudo rm -rf $ARTIFACT_DIR sudo mkdir $ARTIFACT_DIR cd .. sudo cp ./test1_1_netpol_cpu_and_mem_before/* $ARTIFACT_DIR @@ -113,7 +113,7 @@ stages: echo "collect cpu and mem results after scaling" mkdir test1_2_netpol_cpu_and_mem_scale cd test1_2_netpol_cpu_and_mem_scale - echo "running k top node" + echo "running k top node" kubectl top node >> "node_netpol_scale.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_netpol_scale.log" @@ -148,7 +148,7 @@ stages: name: "$(BUILD_POOL_NAME_DEFAULT)" timeoutInMinutes: 120 steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -163,14 +163,14 @@ stages: echo "collect cpu and mem results after connectivity tests" mkdir test1_3_netpol_cpu_and_mem_after cd test1_3_netpol_cpu_and_mem_after - echo "running k top node" + echo "running k top node" kubectl top node >> "node_after_netpol_tests.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_after_netpol_tests.log" echo "Logs will be available as a build artifact" ARTIFACT_DIR=$(Build.ArtifactStagingDirectory)/test1_3_netpol_cpu_and_mem_after/ echo $ARTIFACT_DIR - sudo rm -rf $ARTIFACT_DIR + sudo rm -rf $ARTIFACT_DIR sudo mkdir $ARTIFACT_DIR cd .. sudo cp ./test1_3_netpol_cpu_and_mem_after/* $ARTIFACT_DIR @@ -190,7 +190,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -201,14 +201,14 @@ stages: echo "collect cpu and mem results before scale for lb tests" mkdir test2_1_lb_cpu_and_mem_before cd test2_1_lb_cpu_and_mem_before - echo "running k top node" + echo "running k top node" kubectl top node >> "node_before_lb_scale.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_before_lb_scale.log" echo "Logs will be available as a build artifact" ARTIFACT_DIR=$(Build.ArtifactStagingDirectory)/test2_1_lb_cpu_and_mem_before/ echo $ARTIFACT_DIR - sudo rm -rf $ARTIFACT_DIR + sudo rm -rf $ARTIFACT_DIR sudo mkdir $ARTIFACT_DIR cd .. sudo cp ./test2_1_lb_cpu_and_mem_before/* $ARTIFACT_DIR @@ -218,7 +218,7 @@ stages: echo "collect cpu and mem results after scaling" mkdir test2_2_lb_cpu_and_mem_scale cd test2_2_lb_cpu_and_mem_scale - echo "running k top node" + echo "running k top node" kubectl top node >> "node_lb_scale.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_lb_scale.log" @@ -252,7 +252,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -274,7 +274,7 @@ stages: cd .. mkdir test2_3_lb_cpu_and_mem_after cd test2_3_lb_cpu_and_mem_after - echo "running k top node" + echo "running k top node" kubectl top node >> "node_after_lb_tests.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_after_lb_tests.log" @@ -312,7 +312,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -328,7 +328,7 @@ stages: echo "collect cpu and mem results after netperf tests" mkdir test3_netperf_cpu_and_mem cd test3_netperf_cpu_and_mem - echo "running k top node" + echo "running k top node" kubectl top node >> "node_netperf.log" echo "running k top pod" kubectl top pod -A | grep cilium >> "pod_netperf.log" @@ -337,8 +337,8 @@ stages: ARTIFACT_DIR2=$(Build.ArtifactStagingDirectory)/test3_netperf/ echo $ARTIFACT_DIR echo $ARTIFACT_DIR2 - sudo rm -rf $ARTIFACT_DIR - sudo rm -rf $ARTIFACT_DIR2 + sudo rm -rf $ARTIFACT_DIR + sudo rm -rf $ARTIFACT_DIR2 sudo mkdir $ARTIFACT_DIR sudo mkdir $ARTIFACT_DIR2 cd .. @@ -367,7 +367,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -389,7 +389,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/cilium/nightly-release-test.yml b/.pipelines/cni/cilium/nightly-release-test.yml index 12ea96406a..3e744ed931 100644 --- a/.pipelines/cni/cilium/nightly-release-test.yml +++ b/.pipelines/cni/cilium/nightly-release-test.yml @@ -35,17 +35,19 @@ stages: make docker-operator-generic-image name: BuildCiliumImage displayName: "Build Cilium Image" - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Login" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | az acr login -n $(ACR) - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | set -ex docker tag quay.io/cilium/cilium:$(DOCKER_IMAGE_TAG) $(ACR).azurecr.io/cilium/cilium:$(DOCKER_IMAGE_TAG) @@ -54,11 +56,12 @@ stages: docker push $(ACR).azurecr.io/cilium/operator-generic:$(DOCKER_IMAGE_TAG) name: "PushCiliumImage" displayName: "Push Cilium Image" - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Logout" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | docker logout diff --git a/.pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml b/.pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml index 995a83d2d9..72c9092d76 100644 --- a/.pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml +++ b/.pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml @@ -14,7 +14,7 @@ jobs: pool: name: $(BUILD_POOL_NAME_DEFAULT) steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: ${{ parameters.sub }} scriptLocation: "inlineScript" diff --git a/.pipelines/cni/load-test-templates/create-cluster-template.yaml b/.pipelines/cni/load-test-templates/create-cluster-template.yaml index 98103229e1..006f2bc32d 100644 --- a/.pipelines/cni/load-test-templates/create-cluster-template.yaml +++ b/.pipelines/cni/load-test-templates/create-cluster-template.yaml @@ -10,7 +10,7 @@ parameters: nodeCountWin: 2 steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml index 6a0c1f2387..002b25ab36 100644 --- a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml +++ b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml @@ -8,7 +8,7 @@ parameters: jobName: "deploy_pods" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Pod Deployment" inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) diff --git a/.pipelines/cni/load-test-templates/restart-cns-template.yaml b/.pipelines/cni/load-test-templates/restart-cns-template.yaml index 192afbbb9b..e0527c408f 100644 --- a/.pipelines/cni/load-test-templates/restart-cns-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-cns-template.yaml @@ -7,7 +7,7 @@ parameters: jobName: "restart_cns" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/load-test-templates/restart-hns-template.yaml b/.pipelines/cni/load-test-templates/restart-hns-template.yaml index f688c10aae..b5709baed6 100644 --- a/.pipelines/cni/load-test-templates/restart-hns-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-hns-template.yaml @@ -3,7 +3,7 @@ parameters: cni: "cniv1" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/load-test-templates/restart-node-template.yaml b/.pipelines/cni/load-test-templates/restart-node-template.yaml index e1a54cb49b..2cdd4230f3 100644 --- a/.pipelines/cni/load-test-templates/restart-node-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-node-template.yaml @@ -6,7 +6,7 @@ parameters: region: "" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/load-test-templates/validate-state-template.yaml b/.pipelines/cni/load-test-templates/validate-state-template.yaml index 7068af3342..bde8216b1c 100644 --- a/.pipelines/cni/load-test-templates/validate-state-template.yaml +++ b/.pipelines/cni/load-test-templates/validate-state-template.yaml @@ -5,7 +5,7 @@ parameters: cni: "cilium" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/lsg/kernel-upgrade-template.yaml b/.pipelines/cni/lsg/kernel-upgrade-template.yaml index 83d5c11b58..8cf84e097f 100644 --- a/.pipelines/cni/lsg/kernel-upgrade-template.yaml +++ b/.pipelines/cni/lsg/kernel-upgrade-template.yaml @@ -2,7 +2,7 @@ parameters: clusterName: "" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/lsg/lsg-cni-intergration-template.yaml b/.pipelines/cni/lsg/lsg-cni-intergration-template.yaml index 0b051d181a..73a399b8cb 100644 --- a/.pipelines/cni/lsg/lsg-cni-intergration-template.yaml +++ b/.pipelines/cni/lsg/lsg-cni-intergration-template.yaml @@ -21,7 +21,7 @@ stages: jobs: - job: create_aks_cluster_with_${{ parameters.name }} steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -55,7 +55,7 @@ stages: - job: integration displayName: "Integration Test - ${{ parameters.name }}" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -77,7 +77,7 @@ stages: - job: integration displayName: "Deploy Cilium Components" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Install Cilium, CNS, and ip-masq-agent" retryCountOnTaskFailure: 2 inputs: @@ -166,7 +166,7 @@ stages: displayName: "Recover Resources" dependsOn: restart_cns steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -205,7 +205,7 @@ stages: cilium version name: "InstallCiliumCli" displayName: "Install Cilium CLI" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/pipeline.yaml b/.pipelines/cni/pipeline.yaml index e4b1d1983e..6a190651d8 100644 --- a/.pipelines/cni/pipeline.yaml +++ b/.pipelines/cni/pipeline.yaml @@ -444,7 +444,7 @@ stages: name: windows19_overlay clusterName: w19-amd-ov steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/singletenancy/cniv1-template.yaml b/.pipelines/cni/singletenancy/cniv1-template.yaml index 78232bee58..c89394bccb 100644 --- a/.pipelines/cni/singletenancy/cniv1-template.yaml +++ b/.pipelines/cni/singletenancy/cniv1-template.yaml @@ -43,6 +43,7 @@ stages: name: $(BUILD_POOL_NAME_DEFAULT) dependsOn: - setup + - build_images displayName: "Create Cluster - ${{ parameters.clusterName }}" jobs: - job: create_aks_cluster_with_${{ parameters.name }} @@ -75,6 +76,7 @@ stages: name: $(BUILD_POOL_NAME_DEFAULT) dependsOn: - setup + - build_images displayName: "Create Cluster - ${{ parameters.clusterName }}" jobs: - job: create_aks_cluster_with_${{ parameters.name }} @@ -114,7 +116,7 @@ stages: jobs: - job: update_cni steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -191,7 +193,7 @@ stages: displayName: "Recover Resources" dependsOn: restart_nodes steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -303,7 +305,7 @@ stages: displayName: "Recover Resources" dependsOn: restart_nodesHNS steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/cni/singletenancy/cniv2-template.yaml b/.pipelines/cni/singletenancy/cniv2-template.yaml index 3e77b829fd..b965359b22 100644 --- a/.pipelines/cni/singletenancy/cniv2-template.yaml +++ b/.pipelines/cni/singletenancy/cniv2-template.yaml @@ -43,6 +43,7 @@ stages: name: $(BUILD_POOL_NAME_DEFAULT) dependsOn: - setup + - build_images displayName: "Create Cluster - ${{ parameters.clusterName }}" jobs: - job: create_aks_cluster_with_${{ parameters.name }} @@ -75,6 +76,7 @@ stages: name: $(BUILD_POOL_NAME_DEFAULT) dependsOn: - setup + - build_images displayName: "Create Cluster - ${{ parameters.clusterName }}" jobs: - job: create_aks_cluster_with_${{ parameters.name }} @@ -123,7 +125,7 @@ stages: displayName: "Integration Test - ${{ parameters.name }}" steps: - ${{ if contains(parameters.clusterType, 'overlay') }}: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -142,7 +144,7 @@ stages: name: "overlaye2e" displayName: "Overlay Integration" - ${{ if contains(parameters.clusterType, 'swift') }}: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -246,7 +248,7 @@ stages: displayName: "Recover Resources" dependsOn: restart_cns steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -369,7 +371,7 @@ stages: displayName: "Recover Resources" dependsOn: restart_cns steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/containers/container-template.yaml b/.pipelines/containers/container-template.yaml index 0cef5d8d09..fcbf88d7f2 100644 --- a/.pipelines/containers/container-template.yaml +++ b/.pipelines/containers/container-template.yaml @@ -5,11 +5,12 @@ parameters: os_version: "" steps: -- task: AzureCLI@1 +- task: AzureCLI@2 displayName: "Login" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | az acr login -n $(ACR) @@ -21,10 +22,11 @@ steps: displayName: Image Build retryCountOnTaskFailure: 3 -- task: AzureCLI@1 +- task: AzureCLI@2 displayName: "Logout" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | docker logout diff --git a/.pipelines/containers/manifest-template.yaml b/.pipelines/containers/manifest-template.yaml index 72331b119e..bb41ea5bb1 100644 --- a/.pipelines/containers/manifest-template.yaml +++ b/.pipelines/containers/manifest-template.yaml @@ -5,11 +5,12 @@ parameters: steps: - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Login" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | az acr login -n $(ACR) @@ -36,11 +37,12 @@ steps: displayName: Manifest Push retryCountOnTaskFailure: 3 - - task: AzureCLI@1 + - task: AzureCLI@2 displayName: "Logout" inputs: azureSubscription: $(ACR_ARM_SERVICE_CONNECTION) scriptLocation: "inlineScript" + scriptType: "bash" inlineScript: | docker logout diff --git a/.pipelines/multitenancy/swiftv2-e2e-step-template.yaml b/.pipelines/multitenancy/swiftv2-e2e-step-template.yaml index 6498144f4b..27fcdbedb5 100644 --- a/.pipelines/multitenancy/swiftv2-e2e-step-template.yaml +++ b/.pipelines/multitenancy/swiftv2-e2e-step-template.yaml @@ -19,7 +19,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(ACN_TEST_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/networkobservability/pipeline.yaml b/.pipelines/networkobservability/pipeline.yaml index 019f71720d..c42b989210 100644 --- a/.pipelines/networkobservability/pipeline.yaml +++ b/.pipelines/networkobservability/pipeline.yaml @@ -47,7 +47,7 @@ stages: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -70,7 +70,7 @@ stages: name: "installCiliumCLI" displayName: "Install Cilium CLI" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -131,10 +131,10 @@ stages: retryCountOnTaskFailure: 3 name: "HubbleConnectivityTests" displayName: "Run Hubble Connectivity Tests" - + - stage: deleteCluster condition: always() - dependsOn: + dependsOn: - createCluster - setupCluster jobs: diff --git a/.pipelines/npm/npm-conformance-tests.yaml b/.pipelines/npm/npm-conformance-tests.yaml index 6d10184ddc..1c76e11890 100644 --- a/.pipelines/npm/npm-conformance-tests.yaml +++ b/.pipelines/npm/npm-conformance-tests.yaml @@ -243,7 +243,7 @@ stages: FQDN=`az aks show -n $(AZURE_CLUSTER) -g $(RESOURCE_GROUP) --query fqdn -o tsv` echo "##vso[task.setvariable variable=FQDN]$FQDN" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index a9198057c4..24541ce543 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -405,7 +405,7 @@ stages: clusterName: "ciliume2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" # Cilium Overlay E2E tests - template: singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml @@ -416,7 +416,7 @@ stages: clusterName: "cilovere2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" # Cilium Dualstack Overlay E2E tests - template: singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml @@ -428,7 +428,7 @@ stages: clusterName: "cildsovere2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" # Cilium Overlay with hubble E2E tests - template: singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml @@ -439,7 +439,7 @@ stages: clusterName: "cilwhleovere2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" testHubble: true # Azure Overlay E2E tests @@ -452,7 +452,7 @@ stages: clusterName: "azovere2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" # AKS Swift E2E tests - template: singletenancy/aks-swift/e2e-job-template.yaml @@ -464,7 +464,7 @@ stages: clusterName: "swifte2e" vmSize: Standard_B2ms k8sVersion: "" - dependsOn: "test" + dependsOn: "containerize" # AKS Swift Vnet Scale E2E tests - template: singletenancy/aks-swift/e2e-job-template.yaml @@ -476,7 +476,7 @@ stages: clusterName: "vscaleswifte2e" vmSize: Standard_B2ms k8sVersion: "1.28" - dependsOn: "test" + dependsOn: "containerize" # CNIv1 E2E tests - template: singletenancy/aks/e2e-job-template.yaml @@ -490,7 +490,7 @@ stages: vmSize: Standard_B2s k8sVersion: 1.25 scaleup: 100 - dependsOn: "test" + dependsOn: "containerize" - template: singletenancy/aks/e2e-job-template.yaml parameters: @@ -503,7 +503,7 @@ stages: vmSize: Standard_B2ms os_version: "ltsc2022" scaleup: 50 - dependsOn: "test" + dependsOn: "containerize" # CNI dual stack overlay E2E tests - template: singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml @@ -514,7 +514,7 @@ stages: clusterType: dualstack-overlay-byocni-up clusterName: "dsovere2e" vmSize: Standard_B2ms - dependsOn: "test" + dependsOn: "containerize" # Swiftv2 E2E tests with multitenancy cluster start up - template: multitenancy/swiftv2-e2e-job-template.yaml @@ -526,7 +526,7 @@ stages: clusterName: "mtacluster" nodePoolName: "mtapool" vmSize: $(SWIFTV2_MT_CLUSTER_SKU) - dependsOn: "test" + dependsOn: "containerize" dummyClusterName: "swiftv2dummy" dummyClusterType: "swiftv2-dummy-cluster-up" dummyClusterDisplayName: Swiftv2 Multitenancy Dummy Cluster diff --git a/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml b/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml index 50257112d9..126b56d766 100644 --- a/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml +++ b/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml @@ -59,6 +59,7 @@ stages: parameters: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) + scaleup: 100 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/aks-swift/e2e-step-template.yaml b/.pipelines/singletenancy/aks-swift/e2e-step-template.yaml index e6bf4b7243..1e5a923d4f 100644 --- a/.pipelines/singletenancy/aks-swift/e2e-step-template.yaml +++ b/.pipelines/singletenancy/aks-swift/e2e-step-template.yaml @@ -1,6 +1,7 @@ parameters: name: "" clusterName: "" + scaleup: "" steps: - bash: | @@ -25,7 +26,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -47,6 +48,42 @@ steps: name: "aksswifte2e" displayName: "Run AKS Swift E2E" + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=linux RESTART_CASE=true CNI_TYPE=cniv2 + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 + - script: | echo "Run wireserver and metadata connectivity Tests" bash test/network/wireserver_metadata_test.sh diff --git a/.pipelines/singletenancy/aks/e2e-step-template.yaml b/.pipelines/singletenancy/aks/e2e-step-template.yaml index 9cf62f6608..397bac27dd 100644 --- a/.pipelines/singletenancy/aks/e2e-step-template.yaml +++ b/.pipelines/singletenancy/aks/e2e-step-template.yaml @@ -20,7 +20,7 @@ steps: - task: KubectlInstaller@0 inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -49,7 +49,7 @@ steps: fi name: "deployCNI" displayName: "Deploy CNI" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -69,11 +69,9 @@ steps: cd test/integration/load ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=${{ parameters.os }} go test -count 1 -timeout 30m -tags load -run ^TestLoad$ cd ../../.. - # Remove this once we have cniv1 support for validating the test cluster - echo "Validate State skipped for linux cniv1 for now" - if [ "${{parameters.os}}" == "windows" ]; then - make test-validate-state OS_TYPE=${{ parameters.os }} CNI_TYPE=cniv1 - fi + + make test-validate-state OS_TYPE=${{ parameters.os }} CNI_TYPE=cniv1 + kubectl delete ns load-test displayName: "Validate State" retryCountOnTaskFailure: 3 diff --git a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml index 626606c499..2bc03a4726 100644 --- a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml @@ -45,6 +45,7 @@ stages: jobs: - job: ${{ parameters.name }}_linux displayName: Azure CNI Overlay Test Suite | Linux - (${{ parameters.name }}) + timeoutInMinutes: 120 pool: name: $(BUILD_POOL_NAME_DEFAULT) demands: @@ -56,10 +57,39 @@ stages: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) os: linux + scaleup: 100 + + - job: windows_nodepool + displayName: Add Windows Nodepool + dependsOn: ${{ parameters.name }}_linux + pool: + name: $(BUILD_POOL_NAME_DEFAULT) + demands: + - agent.os -equals Linux + - Role -equals $(CUSTOM_E2E_ROLE) + steps: + - task: AzureCLI@2 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) + make -C ./hack/aks windows-nodepool-up AZCLI=az SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }}-$(commitID) VM_SIZE_WIN=${{ parameters.vmSize }} + echo "Windows node are successfully added to v4 Overlay Cluster" + kubectl cluster-info + kubectl get node -owide + kubectl get po -owide -A + name: "Add_Windows_Node" + displayName: "Add windows node on v4 overlay cluster" + - job: ${{ parameters.name }}_windows displayName: Azure CNI Overlay Test Suite | Windows - (${{ parameters.name }}) - dependsOn: ${{ parameters.name }}_linux + timeoutInMinutes: 120 + dependsOn: windows_nodepool pool: name: $(BUILD_POOL_NAME_DEFAULT) demands: @@ -71,7 +101,7 @@ stages: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) os: windows - vmSizeWin: ${{ parameters.vmSize }} # Matching linux vmSize + scaleup: 50 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-step-template.yaml index cd942cdb89..633c427e62 100644 --- a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-step-template.yaml @@ -2,6 +2,7 @@ parameters: name: "" clusterName: "" os: "" + scaleup: "" steps: - bash: | @@ -19,7 +20,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -40,7 +41,7 @@ steps: name: "integrationTest" displayName: "Run CNS Integration Tests on AKS Overlay" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -56,7 +57,7 @@ steps: done displayName: "Restart Nodes" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -64,30 +65,18 @@ steps: addSpnToEnvironment: true inlineScript: | cd test/integration/load - clusterName=${{ parameters.clusterName }} - make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName} - make -C ./hack/aks azcfg AZCLI=az REGION=$(REGION_AKS_CLUSTER_TEST) + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ kubectl get pods -owide -A + + cd ../../.. echo "Validating Node Restart" - CNI_TYPE=cniv2 RESTART_CASE=true go test -timeout 30m -tags load -run ^TestValidateState$ + make test-validate-state OS_TYPE=linux RESTART_CASE=true CNI_TYPE=cniv2 + kubectl delete ns load-test displayName: "Validate Node Restart" retryCountOnTaskFailure: 3 - - script: | - echo "validate pod IP assignment before CNS restart" - kubectl get pod -owide -A - echo "validate pod state before CNS restarts" - cd test/integration/load - CNI_TYPE=cniv2 go test -timeout 30m -tags load -run ^TestValidateState$ - kubectl rollout restart ds azure-cns -n kube-system - kubectl rollout status ds azure-cns -n kube-system - kubectl get pod -owide -A - echo "validate pods after CNS restart" - CNI_TYPE=cniv2 go test -timeout 30m -tags load -run ^TestValidateState$ - name: "restartCNS_ValidatePodState" - displayName: "Restart CNS and validate pod state" - retryCountOnTaskFailure: 3 - - script: | echo "Run wireserver and metadata connectivity Tests" bash test/network/wireserver_metadata_test.sh @@ -96,22 +85,6 @@ steps: displayName: "Run Wireserver and Metadata Connectivity Tests" - ${{ if eq(parameters.os, 'windows') }}: - - task: AzureCLI@2 - inputs: - azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) - scriptLocation: "inlineScript" - scriptType: "bash" - addSpnToEnvironment: true - inlineScript: | - set -e - make -C ./hack/aks windows-nodepool-up AZCLI=az SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} - echo "Windows node are successfully added to v4 Overlay Cluster" - kubectl cluster-info - kubectl get node -owide - kubectl get po -owide -A - name: "Add_Windows_Node" - displayName: "Add windows node on v4 overlay cluster" - - script: | nodeList=`kubectl get node -owide | grep Windows | awk '{print $1}'` for node in $nodeList; do @@ -132,3 +105,39 @@ steps: name: "WindowsV4OverlayDatapathTests" displayName: "Windows v4Overlay Datapath Tests" retryCountOnTaskFailure: 3 + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=windows go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=windows RESTART_CASE=true CNI_TYPE=cniv2 + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 diff --git a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml index bf8cb35b2a..fc8ece1a3a 100644 --- a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-job-template.yaml @@ -55,6 +55,7 @@ stages: parameters: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) + scaleup: 100 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml index d83135426c..68ffec9dd8 100644 --- a/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml @@ -1,6 +1,7 @@ parameters: name: "" clusterName: "" + scaleup: "" steps: @@ -19,7 +20,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -68,6 +69,42 @@ steps: name: "CiliumStatus" displayName: "Cilium Status" + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=linux RESTART_CASE=true CNI_TYPE=cilium_dualstack + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 + - script: | echo "Run Cilium Connectivity Tests" cilium status @@ -109,7 +146,7 @@ steps: retryCountOnTaskFailure: 3 name: "WireserverMetadataConnectivityTests" displayName: "Run Wireserver and Metadata Connectivity Tests" - + - script: | cd hack/scripts chmod +x async-delete-test.sh diff --git a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml index 01ab0823eb..7753baa716 100644 --- a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml @@ -59,6 +59,7 @@ stages: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) testHubble: ${{ parameters.testHubble }} + scaleup: 100 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml index fe5970993c..50a5515226 100644 --- a/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml @@ -2,6 +2,7 @@ parameters: name: "" clusterName: "" testHubble: false + scaleup: "" steps: - bash: | @@ -26,7 +27,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -72,6 +73,42 @@ steps: name: "CiliumStatus" displayName: "Cilium Status" + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=linux RESTART_CASE=true + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 + - script: | echo "Run Cilium Connectivity Tests" cilium status @@ -147,7 +184,7 @@ steps: retryCountOnTaskFailure: 3 name: "WireserverMetadataConnectivityTests" displayName: "Run Wireserver and Metadata Connectivity Tests" - + - script: | cd hack/scripts chmod +x async-delete-test.sh diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml index 4a0a840b94..17c5245dac 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml @@ -57,6 +57,7 @@ stages: parameters: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) + scaleup: 100 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml index 991fa32e40..1942c00c57 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml @@ -2,6 +2,8 @@ parameters: name: "" clusterName: "" testHubble: false + scaleup: "" + steps: - bash: | @@ -26,7 +28,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -93,6 +95,42 @@ steps: name: "CiliumStatus" displayName: "Cilium Status" + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=linux RESTART_CASE=true + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 + - script: | echo "Run Cilium Connectivity Tests" cilium status @@ -186,7 +224,7 @@ steps: retryCountOnTaskFailure: 3 name: "WireserverMetadataConnectivityTests" displayName: "Run Wireserver and Metadata Connectivity Tests" - + - script: | if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then echo "Running nightly, skip async delete test" diff --git a/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml b/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml index 5af6a31ab9..b5ce250259 100644 --- a/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml @@ -60,6 +60,7 @@ stages: parameters: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) + scaleup: 100 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/cilium/cilium-e2e-step-template.yaml b/.pipelines/singletenancy/cilium/cilium-e2e-step-template.yaml index 2e4a20a4d9..5597558556 100644 --- a/.pipelines/singletenancy/cilium/cilium-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium/cilium-e2e-step-template.yaml @@ -1,6 +1,7 @@ parameters: name: "" clusterName: "" + scaleup: "" steps: - bash: | @@ -25,7 +26,7 @@ steps: inputs: kubectlVersion: latest - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -72,6 +73,42 @@ steps: name: "CiliumStatus" displayName: "Cilium Status" + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + kubectl get po -owide -A + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=linux RESTART_CASE=true + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 + - script: | echo "Run Cilium Connectivity Tests" cilium status @@ -94,26 +131,13 @@ steps: name: "validatePods" displayName: "Validate Pods" - - script: | - echo "validate pod IP assignment before CNS restart" - kubectl get pod -owide -A - make test-validate-state - echo "restart CNS" - kubectl rollout restart ds azure-cns -n kube-system - kubectl rollout status ds azure-cns -n kube-system - kubectl get pod -owide -A - echo "validate pods after CNS restart" - make test-validate-state - name: "restartCNS" - displayName: "Restart CNS and validate pods" - - script: | echo "Run wireserver and metadata connectivity Tests" bash test/network/wireserver_metadata_test.sh retryCountOnTaskFailure: 3 name: "WireserverMetadataConnectivityTests" displayName: "Run Wireserver and Metadata Connectivity Tests" - + - script: | cd hack/scripts chmod +x async-delete-test.sh diff --git a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml index 0093dd8e48..8d4daa617e 100644 --- a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml @@ -46,6 +46,7 @@ stages: jobs: - job: ${{ parameters.name }}_linux displayName: DualStack Overlay Test Suite | Linux - (${{ parameters.name }}) + timeoutInMinutes: 120 pool: name: $(BUILD_POOL_NAME_DEFAULT) demands: @@ -57,10 +58,38 @@ stages: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) os: linux + scaleup: 100 + + - job: windows_nodepool + displayName: Add Windows Nodepool + dependsOn: ${{ parameters.name }}_linux + pool: + name: $(BUILD_POOL_NAME_DEFAULT) + demands: + - agent.os -equals Linux + - Role -equals $(CUSTOM_E2E_ROLE) + steps: + - task: AzureCLI@2 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) + make -C ./hack/aks windows-nodepool-up AZCLI=az SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }}-$(commitID) VM_SIZE_WIN=${{ parameters.vmSize }} + echo "Windows nodes have been successfully added to DualStack Overlay Cluster" + kubectl cluster-info + kubectl get node -owide + kubectl get po -owide -A + name: "Add_Windows_Node" + displayName: "Add windows node" - job: ${{ parameters.name }}_windows displayName: DualStack Overlay Test Suite | Windows - (${{ parameters.name }}) - dependsOn: ${{ parameters.name }}_linux + timeoutInMinutes: 120 + dependsOn: windows_nodepool pool: name: $(BUILD_POOL_NAME_DEFAULT) demands: @@ -72,7 +101,7 @@ stages: name: ${{ parameters.name }} clusterName: ${{ parameters.clusterName }}-$(commitID) os: windows - vmSizeWin: ${{ parameters.vmSize }} # Matching linux vmSize + scaleup: 50 - template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml parameters: diff --git a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-step-template.yaml b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-step-template.yaml index 3a519f83ce..9dcbe186db 100644 --- a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-step-template.yaml @@ -3,6 +3,7 @@ parameters: clusterName: "" cni: "dualstack" os: "" + scaleup: "" steps: - bash: | @@ -37,7 +38,7 @@ steps: kubectl cluster-info kubectl get node kubectl get po -owide -A - sudo -E env "PATH=$PATH" make test-load SCALE_UP=32 OS_TYPE=linux CNI_TYPE=cniv2 VALIDATE_STATEFILE=true INSTALL_CNS=true INSTALL_DUALSTACK_OVERLAY=true VALIDATE_DUALSTACK=true CNI_VERSION=$(make cni-version) CNS_VERSION=$(make cns-version) CLEANUP=true + sudo -E env "PATH=$PATH" make test-load SCALE_UP=32 OS_TYPE=linux CNI_TYPE=dualstack VALIDATE_STATEFILE=true INSTALL_CNS=true INSTALL_DUALSTACK_OVERLAY=true VALIDATE_DUALSTACK=true CNI_VERSION=$(make cni-version) CNS_VERSION=$(make cns-version) CLEANUP=true retryCountOnTaskFailure: 3 name: "integrationTest" displayName: "Run CNS Integration Tests on AKS DualStack Overlay" @@ -54,7 +55,7 @@ steps: name: "DualStack_Overlay_Linux_Tests" displayName: "DualStack Overlay Linux Tests" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -69,7 +70,7 @@ steps: done displayName: "Restart Nodes" - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" @@ -77,47 +78,19 @@ steps: addSpnToEnvironment: true inlineScript: | cd test/integration/load - clusterName=${{ parameters.clusterName }} - make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName} - make -C ./hack/aks azcfg AZCLI=az REGION=$(REGION_DUALSTACKOVERLAY_CLUSTER_TEST) - kubectl get pods -A + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=linux go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. echo "Validating Node Restart" - CNI_TYPE=dualstack RESTART_CASE=true go test -timeout 30m -tags load -run ^TestValidateState$ + make test-validate-state OS_TYPE=linux RESTART_CASE=true CNI_TYPE=dualstack + kubectl delete ns load-test displayName: "Validate Node Restart" retryCountOnTaskFailure: 3 - - script: | - echo "validate pod IP assignment before CNS restart" - kubectl get pod -owide -A - echo "validate pod state before CNS restarts" - cd test/integration/load - CNI_TYPE=dualstack go test -timeout 30m -tags load -run ^TestValidateState$ - kubectl rollout restart ds azure-cns -n kube-system - kubectl rollout status ds azure-cns -n kube-system - kubectl get pod -owide -A - echo "validate pods after CNS restarts" - CNI_TYPE=dualstack go test -timeout 30m -tags load -run ^TestValidateState$ - name: "restartCNS_ValidatePodState" - displayName: "Restart CNS and Validate Pod State" - retryCountOnTaskFailure: 3 - - ${{ if eq(parameters.os, 'windows') }}: - - task: AzureCLI@2 - inputs: - azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) - scriptLocation: "inlineScript" - scriptType: "bash" - addSpnToEnvironment: true - inlineScript: | - set -e - make -C ./hack/aks windows-nodepool-up AZCLI=az SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} - echo "Windows nodes have been successfully added to DualStack Overlay Cluster" - kubectl cluster-info - kubectl get node -owide - kubectl get po -owide -A - name: "Add_Windows_Node" - displayName: "Add windows node" - - script: | nodeList=`kubectl get node -owide | grep Windows | awk '{print $1}'` for node in $nodeList; do @@ -138,3 +111,38 @@ steps: name: "WindowsDualStackOverlayDatapathTests" displayName: "Windows DualStack Overlay Datapath Tests" retryCountOnTaskFailure: 3 + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -e + clusterName=${{ parameters.clusterName }} + echo "Restarting nodes" + for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_DUALSTACKOVERLAY_CLUSTER_TEST) --query "[].name" -o tsv); do + make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_DUALSTACKOVERLAY_CLUSTER_TEST) VMSS_NAME=${val} + done + displayName: "Restart Nodes" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + cd test/integration/load + + # Scale Cluster Up/Down to confirm functioning CNS + ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=windows go test -count 1 -timeout 30m -tags load -run ^TestLoad$ + kubectl get pods -owide -A + + cd ../../.. + echo "Validating Node Restart" + make test-validate-state OS_TYPE=windows RESTART_CASE=true CNI_TYPE=cniv2 + kubectl delete ns load-test + displayName: "Validate Node Restart" + retryCountOnTaskFailure: 3 diff --git a/.pipelines/templates/create-cluster-swiftv2.yaml b/.pipelines/templates/create-cluster-swiftv2.yaml index cda11617a4..42beecc97b 100644 --- a/.pipelines/templates/create-cluster-swiftv2.yaml +++ b/.pipelines/templates/create-cluster-swiftv2.yaml @@ -6,7 +6,7 @@ jobs: - job: ${{ parameters.name }} displayName: Cluster - ${{ parameters.name }} steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(ACN_TEST_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/templates/create-cluster.yaml b/.pipelines/templates/create-cluster.yaml index bca48745ee..534c486a2d 100644 --- a/.pipelines/templates/create-cluster.yaml +++ b/.pipelines/templates/create-cluster.yaml @@ -15,7 +15,7 @@ jobs: - job: ${{ parameters.name }} displayName: Cluster - ${{ parameters.name }} steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/templates/delete-cluster.yaml b/.pipelines/templates/delete-cluster.yaml index 0bb124005c..bcb84be00a 100644 --- a/.pipelines/templates/delete-cluster.yaml +++ b/.pipelines/templates/delete-cluster.yaml @@ -4,7 +4,7 @@ parameters: region: "" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript" diff --git a/.pipelines/templates/log-template.yaml b/.pipelines/templates/log-template.yaml index 910c1b80f6..fee969889f 100644 --- a/.pipelines/templates/log-template.yaml +++ b/.pipelines/templates/log-template.yaml @@ -23,7 +23,7 @@ parameters: jobName: "FailedE2ELogs" steps: - - task: AzureCLI@1 + - task: AzureCLI@2 inputs: azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) scriptLocation: "inlineScript"