Skip to content

Commit

Permalink
ci: Parameterize dropgz input for all Release pipeline scenarios (#2354)
Browse files Browse the repository at this point in the history
* fix: parameterize dropgz input

* ci: verbose output for cniv1
  • Loading branch information
jpayne3506 authored Nov 7, 2023
1 parent 743583b commit f373a56
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
6 changes: 1 addition & 5 deletions .pipelines/cni/cilium/cilium-overlay-load-test-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ stages:
kubectl get po -owide -A
echo "Deploy Azure-CNS"
if [ -z $(DROP_GZ_VERSION) ]; then
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
else
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(DROP_GZ_VERSION) INSTALL_CNS=true INSTALL_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
fi
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
kubectl get po -owide -A
- job: deploy_pods
condition: and( and( not(canceled()), not(failed()) ), or( contains(variables.CONTROL_SCENARIO, 'scaleTest') , contains(variables.CONTROL_SCENARIO, 'all') ) )
Expand Down
7 changes: 6 additions & 1 deletion .pipelines/cni/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ stages:
go version
echo "##vso[task.setvariable variable=commitID;isOutput=true]$(echo $(make revision)-$(date "+%d%H%M"))"
echo "##vso[task.setvariable variable=npmVersion;isOutput=true]$(make npm-version)"
echo "##vso[task.setvariable variable=dropgzVersion;isOutput=true]$(make cni-dropgz-test-version)"
echo "##vso[task.setvariable variable=cnsVersion;isOutput=true]$(CNS_VERSION)"
if [ -z $(DROP_GZ_VERSION) ]; then
echo "##vso[task.setvariable variable=dropgzVersion;isOutput=true]$(make cni-dropgz-test-version)"
else
echo "##vso[task.setvariable variable=dropgzVersion;isOutput=true]$(DROP_GZ_VERSION)"
fi
name: "SetEnvVars"
displayName: "Set Environment Variables"
condition: always()
Expand Down
10 changes: 7 additions & 3 deletions .pipelines/cni/singletenancy/cniv1-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,20 @@ stages:
set -ex
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID)
echo "Upload CNI"
echo "Deploying on Linux nodes"
if [ "${{parameters.os}}" == "windows" ]; then
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='linux' ARCH=${{ parameters.arch }} CNI_DROPGZ_VERSION=$(dropgzVersion))
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='linux' ARCH=${{ parameters.arch }} CNI_DROPGZ_TEST_VERSION=$(dropgzVersion))
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./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 DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='windows' ARCH=${{ parameters.arch }} OS_VERSION=${{ parameters.os_version }} CNI_DROPGZ_VERSION=$(dropgzVersion))
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='windows' ARCH=${{ parameters.arch }} OS_VERSION=${{ parameters.os_version }} CNI_DROPGZ_TEST_VERSION=$(dropgzVersion))
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./test/integration/manifests/cni/cni-installer-v1-windows.yaml | kubectl apply -f -
kubectl rollout status daemonset/azure-cni-windows -n kube-system
else
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS=${{ parameters.os }} ARCH=${{ parameters.arch }} CNI_DROPGZ_VERSION=$(dropgzVersion))
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS=${{ parameters.os }} ARCH=${{ parameters.arch }} CNI_DROPGZ_TEST_VERSION=$(dropgzVersion))
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./test/integration/manifests/cni/cni-installer-v1.yaml | kubectl apply -f -
kubectl rollout status daemonset/azure-cni -n kube-system
fi
Expand Down
12 changes: 2 additions & 10 deletions .pipelines/cni/singletenancy/linux-cniv2-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ stages:
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID)
kubectl cluster-info
kubectl get po -owide -A
if [ -z $(DROP_GZ_VERSION) ]; then
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_AZURE_CNI_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
else
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(DROP_GZ_VERSION) INSTALL_CNS=true INSTALL_AZURE_CNI_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
fi
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_AZURE_CNI_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
name: "overlaye2e"
displayName: "Overlay Integration"
- ${{ if contains(parameters.clusterType, 'swift') }}:
Expand All @@ -125,11 +121,7 @@ stages:
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID)
kubectl cluster-info
kubectl get po -owide -A
if [ -z $(DROP_GZ_VERSION) ]; then
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_AZURE_VNET=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
else
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(DROP_GZ_VERSION) INSTALL_CNS=true INSTALL_AZURE_VNET=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
fi
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(cnsVersion) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_AZURE_VNET=true TEST_DROPGZ=${{ parameters.testDropgz }} CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
name: "swifte2e"
displayName: "Swift Integration"
- template: ../../npm/npm-cni-integration-test.yaml
Expand Down
4 changes: 4 additions & 0 deletions .pipelines/singletenancy/aks/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ steps:
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 DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='linux' ARCH=${{ parameters.arch }} CNI_DROPGZ_VERSION=${{ parameters.version }})
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./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 DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS='windows' ARCH=${{ parameters.arch }} OS_VERSION=${{ parameters.os_version }} CNI_DROPGZ_VERSION=${{ parameters.version }})
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./test/integration/manifests/cni/cni-installer-v1-windows.yaml | kubectl apply -f -
kubectl rollout status daemonset/azure-cni-windows -n kube-system
else
export DROP_GZ_URL=$( make cni-dropgz-test-image-name-and-tag OS=${{ parameters.os }} ARCH=${{ parameters.arch }} CNI_DROPGZ_VERSION=${{ parameters.version }})
echo "Dropgz image: $DROP_GZ_URL"
envsubst < ./test/integration/manifests/cni/cni-installer-v1.yaml | kubectl apply -f -
kubectl rollout status daemonset/azure-cni -n kube-system
fi
Expand Down

0 comments on commit f373a56

Please sign in to comment.