|
| 1 | +parameters: |
| 2 | + name: "" |
| 3 | + clusterName: "" |
| 4 | + |
| 5 | +steps: |
| 6 | + |
| 7 | + - bash: | |
| 8 | + go version |
| 9 | + go env |
| 10 | + mkdir -p '$(GOBIN)' |
| 11 | + mkdir -p '$(GOPATH)/pkg' |
| 12 | + mkdir -p '$(modulePath)' |
| 13 | + echo '##vso[task.prependpath]$(GOBIN)' |
| 14 | + echo '##vso[task.prependpath]$(GOROOT)/bin' |
| 15 | + name: "GoEnv" |
| 16 | + displayName: "Set up the Go environment" |
| 17 | +
|
| 18 | + - task: KubectlInstaller@0 |
| 19 | + inputs: |
| 20 | + kubectlVersion: latest |
| 21 | + |
| 22 | + - task: AzureCLI@1 |
| 23 | + inputs: |
| 24 | + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) |
| 25 | + scriptLocation: "inlineScript" |
| 26 | + scriptType: "bash" |
| 27 | + addSpnToEnvironment: true |
| 28 | + inlineScript: | |
| 29 | + set -e |
| 30 | + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }} |
| 31 | + ls -lah |
| 32 | + pwd |
| 33 | + kubectl cluster-info |
| 34 | + kubectl get po -owide -A |
| 35 | + echo "deploy Cilium ConfigMap" |
| 36 | + kubectl apply -f test/integration/manifests/cilium/cilium-config-dualstack.yaml |
| 37 | + echo "install Cilium ${CILIUM_VERSION_TAG}" |
| 38 | + # Passes Cilium image to daemonset and deployment |
| 39 | + envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/daemonset.yaml | kubectl apply -f - |
| 40 | + envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/deployment.yaml | kubectl apply -f - |
| 41 | + # Use different file directories for nightly and current cilium version |
| 42 | + kubectl apply -f test/integration/manifests/cilium/cilium-agent |
| 43 | + kubectl apply -f test/integration/manifests/cilium/cilium-operator |
| 44 | + kubectl get po -owide -A |
| 45 | + name: "installCilium" |
| 46 | + displayName: "Install Cilium on AKS Dualstack Overlay" |
| 47 | + |
| 48 | + - script: | |
| 49 | + echo "install cilium CLI" |
| 50 | + if [[ ${CILIUM_VERSION_TAG} =~ ^1.1[1-3].[0-9]{1,2} ]]; then |
| 51 | + echo "Cilium Agent Version ${BASH_REMATCH[0]}" |
| 52 | + CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable-v0.14.txt) |
| 53 | + else |
| 54 | + echo "Cilium Agent Version ${CILIUM_VERSION_TAG}" |
| 55 | + CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt) |
| 56 | + fi |
| 57 | + CLI_ARCH=amd64 |
| 58 | + if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi |
| 59 | + curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} |
| 60 | + sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum |
| 61 | + sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin |
| 62 | + rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} |
| 63 | + cilium status |
| 64 | + cilium version |
| 65 | + name: "installCiliumCLI" |
| 66 | + displayName: "Install Cilium CLI" |
| 67 | +
|
| 68 | + - script: | |
| 69 | + echo "Start Azilium E2E Tests on Overlay Cluster" |
| 70 | + sudo -E env "PATH=$PATH" make test-load SCALE_UP=32 OS_TYPE=linux CNI_TYPE=cilium_dualstack VALIDATE_STATEFILE=true INSTALL_CNS=true INSTALL_OVERLAY=true AZURE_IPAM_VERSION=$(make azure-ipam-version) CNS_VERSION=$(make cns-version) CLEANUP=true |
| 71 | + retryCountOnTaskFailure: 3 |
| 72 | + name: "aziliumTest" |
| 73 | + displayName: "Run Azilium E2E on AKS Overlay" |
| 74 | +
|
| 75 | + - script: | |
| 76 | + kubectl get pods -A |
| 77 | + echo "Waiting < 2 minutes for cilium to be ready" |
| 78 | + # Ensure Cilium is ready Xm\Xs |
| 79 | + cilium status --wait --wait-duration 2m |
| 80 | + retryCountOnTaskFailure: 3 |
| 81 | + name: "CiliumStatus" |
| 82 | + displayName: "Cilium Status" |
| 83 | +
|
| 84 | + - script: | |
| 85 | + echo "Run Cilium Connectivity Tests" |
| 86 | + cilium status |
| 87 | + cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' |
| 88 | + retryCountOnTaskFailure: 3 |
| 89 | + name: "ciliumConnectivityTests" |
| 90 | + displayName: "Run Cilium Connectivity Tests" |
| 91 | +
|
| 92 | + - script: | |
| 93 | + set -e |
| 94 | + kubectl get po -owide -A |
| 95 | + cd test/integration/datapath |
| 96 | + echo "Dualstack Overlay Linux datapath IPv6 test" |
| 97 | + go test -count=1 datapath_linux_test.go -timeout 3m -tags connection -run ^TestDatapathLinux$ -tags=connection,integration -isDualStack=true |
| 98 | + echo "Dualstack Overlay Linux datapath IPv4 test" |
| 99 | + go test -count=1 datapath_linux_test.go -timeout 3m -tags connection -run ^TestDatapathLinux$ -tags=connection,integration |
| 100 | + retryCountOnTaskFailure: 3 |
| 101 | + name: "DualStack_Overlay_Linux_Tests" |
| 102 | + displayName: "DualStack Overlay Linux Tests" |
| 103 | +
|
| 104 | + - script: | |
| 105 | + echo "validate pod IP assignment and check systemd-networkd restart" |
| 106 | + kubectl get pod -owide -A |
| 107 | + # Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change. |
| 108 | + # Saves 17 minutes |
| 109 | + kubectl delete deploy -n cilium-test echo-external-node |
| 110 | + cd test/integration/load |
| 111 | + CNI_TYPE=cilium_dualstack go test -timeout 30m -tags load -run ^TestValidateState$ |
| 112 | + echo "delete cilium connectivity test resources and re-validate state" |
| 113 | + kubectl delete ns cilium-test |
| 114 | + kubectl get pod -owide -A |
| 115 | + CNI_TYPE=cilium_dualstack go test -timeout 30m -tags load -run ^TestValidateState$ |
| 116 | + name: "validatePods" |
| 117 | + displayName: "Validate Pods" |
| 118 | +
|
| 119 | + - script: | |
| 120 | + echo "Run wireserver and metadata connectivity Tests" |
| 121 | + bash test/network/wireserver_metadata_test.sh |
| 122 | + retryCountOnTaskFailure: 3 |
| 123 | + name: "WireserverMetadataConnectivityTests" |
| 124 | + displayName: "Run Wireserver and Metadata Connectivity Tests" |
0 commit comments