87 строки
3.1 KiB
YAML
87 строки
3.1 KiB
YAML
parameters:
|
|
name: ""
|
|
clusterName: ""
|
|
arch: ""
|
|
os: ""
|
|
os_version: ""
|
|
scaleup: ""
|
|
|
|
steps:
|
|
- bash: |
|
|
go version
|
|
go env
|
|
mkdir -p '$(GOBIN)'
|
|
mkdir -p '$(GOPATH)/pkg'
|
|
mkdir -p '$(modulePath)'
|
|
echo '##vso[task.prependpath]$(GOBIN)'
|
|
echo '##vso[task.prependpath]$(GOROOT)/bin'
|
|
name: "GoEnv"
|
|
displayName: "Set up the Go environment"
|
|
|
|
- task: KubectlInstaller@0
|
|
inputs:
|
|
kubectlVersion: latest
|
|
|
|
- task: AzureCLI@2
|
|
inputs:
|
|
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
|
|
scriptLocation: "inlineScript"
|
|
scriptType: "bash"
|
|
workingDirectory: $(ACN_DIR)
|
|
addSpnToEnvironment: true
|
|
inlineScript: |
|
|
set -e
|
|
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
|
|
echo "Upload CNI"
|
|
echo "Deploying on Linux nodes"
|
|
if [ "${{parameters.os}}" == "windows" ]; then
|
|
export CNI_IMAGE=$(make cni-image-name-and-tag OS='linux' ARCH=${{ parameters.arch }})
|
|
echo "CNI image: $CNI_IMAGE"
|
|
envsubst '${CNI_IMAGE}' < ./test/integration/manifests/cni/cni-installer-v1.yaml | kubectl apply -f -
|
|
kubectl rollout status daemonset/azure-cni -n kube-system
|
|
echo "Deploying on windows nodes"
|
|
export CNI_IMAGE=$( make cni-image-name-and-tag OS='windows' ARCH=${{ parameters.arch }} OS_VERSION=${{ parameters.os_version }})
|
|
echo "CNI image: $CNI_IMAGE"
|
|
envsubst '${CNI_IMAGE}' < ./test/integration/manifests/cni/cni-installer-v1-windows.yaml | kubectl apply -f -
|
|
kubectl rollout status daemonset/azure-cni-windows -n kube-system
|
|
else
|
|
export CNI_IMAGE=$(make cni-image-name-and-tag OS=${{ parameters.os }} ARCH=${{ parameters.arch }})
|
|
echo "CNI image: $CNI_IMAGE"
|
|
envsubst '${CNI_IMAGE}' < ./test/integration/manifests/cni/cni-installer-v1.yaml | kubectl apply -f -
|
|
kubectl rollout status daemonset/azure-cni -n kube-system
|
|
fi
|
|
name: "deployCNI"
|
|
displayName: "Deploy CNI"
|
|
|
|
- task: AzureCLI@2
|
|
inputs:
|
|
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
|
|
scriptLocation: "inlineScript"
|
|
scriptType: "bash"
|
|
workingDirectory: $(ACN_DIR)
|
|
addSpnToEnvironment: true
|
|
inlineScript: |
|
|
set -e
|
|
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"
|
|
|
|
- script: |
|
|
kubectl get pods -A -o wide
|
|
|
|
echo "Deploying test pods"
|
|
pushd test/integration/load
|
|
ITERATIONS=2 SCALE_UP=${{ parameters.scaleup }} OS_TYPE=${{ parameters.os }} go test -count 1 -timeout 30m -tags load -run ^TestLoad$
|
|
popd
|
|
|
|
make test-validate-state OS_TYPE=${{ parameters.os }} CNI_TYPE=cniv1
|
|
|
|
kubectl delete ns load-test
|
|
workingDirectory: $(ACN_DIR)
|
|
displayName: "Validate State"
|
|
retryCountOnTaskFailure: 3
|
|
|