Skip to content

Commit

Permalink
ci: remove aks-engine cluster in test matrix (#779)
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
  • Loading branch information
aramase authored Feb 2, 2022
1 parent 4f79862 commit cdfff93
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 347 deletions.
13 changes: 2 additions & 11 deletions .pipelines/e2e-job-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,9 @@ pool: staging-pool
jobs:
- template: templates/e2e-test-azure.yaml
parameters:
clusterTypes:
- "aks"
osTypes:
- "linux"
- "windows-docker"
- "windows-containerd"
- template: templates/e2e-test-azure.yaml
parameters:
clusterTypes:
- "aks-engine"
osTypes:
- "linux"
- "windows"
- "windows_docker"
- "windows_containerd"
# this will ensure any changes to provider works on arc extension too.
- template: templates/arc/e2e-extension-test.yaml
5 changes: 0 additions & 5 deletions .pipelines/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ jobs:
- template: templates/load-test.yaml
- template: templates/e2e-test-azure.yaml
parameters:
clusterTypes:
- "aks"
- "aks-engine"
osTypes:
- "linux"
- "windows"
testClusterUpgrade: true
- template: templates/e2e-test-azure.yaml
parameters:
clusterTypes:
- "aks"
osTypes:
- "linux"
testWithGPU: true
Expand Down
47 changes: 0 additions & 47 deletions .pipelines/templates/aks-engine-setup.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .pipelines/templates/aks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ steps:
echo "AKS cluster name is set to - $clusterName"
fi
displayName: "Set cluster name"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
- script: |
echo "##vso[task.setvariable variable=NODE_VM_SIZE]Standard_DS2_v2"
displayName: "Determine VM Size"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
- script: |
#Run test with latest on preview aks version available
Expand All @@ -31,7 +31,7 @@ steps:
echo "##vso[task.setvariable variable=AKS_INSTALL_VERSION]$aksVersion"
displayName: "Determine aks install version"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
- ${{ if eq(parameters.testClusterUpgrade, true) }}:
# Overrride AKS_INSTALL_VERSION if testing with k8s upgrade
Expand All @@ -42,7 +42,7 @@ steps:
echo "##vso[task.setvariable variable=AKS_INSTALL_VERSION]$aksVersion"
displayName: "Determine aks install version"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
- script: |
az group create -n ${AZURE_CLUSTER_NAME} -l $(AZURE_LOCATION)
Expand Down Expand Up @@ -104,4 +104,4 @@ steps:
kubectl cluster-info
kubectl describe nodes
displayName: "Deploy Kubernetes cluster"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
2 changes: 1 addition & 1 deletion .pipelines/templates/aks-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ steps:
kubectl get nodes -owide
kubectl cluster-info
displayName: "Upgrade kubernetes version"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))
condition: succeeded()
2 changes: 0 additions & 2 deletions .pipelines/templates/arc/e2e-test-aks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
jobs:
- job: e2e_arc_aks
variables:
- name: CLUSTER_TYPE
value: aks
- name: OS_TYPE
value: linux
- group: csi-secrets-store-e2e
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/templates/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ steps:
if [[ ${{ parameters.ciKindCluster }} == True ]]; then
IMAGE_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)-e2e"
elif [[ -n "${CLUSTER_CONFIG:-}" ]]; then
IMAGE_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)-$(CLUSTER_TYPE)-$(OS_TYPE)"
IMAGE_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)-${CLUSTER_CONFIG}"
else
IMAGE_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)-$(CLUSTER_TYPE)-load"
IMAGE_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)-load"
fi
echo "Image version: ${IMAGE_VERSION}"
export IMAGE_VERSION="${IMAGE_VERSION}"
Expand Down
173 changes: 82 additions & 91 deletions .pipelines/templates/e2e-test-azure.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
parameters:
- name: clusterTypes
type: object
- name: osTypes
type: object
- name: testClusterUpgrade
Expand All @@ -11,106 +9,99 @@ parameters:
default: false

jobs:
- ${{ each clusterType in parameters.clusterTypes }}:
- ${{ each osType in parameters.osTypes }}:
- job:
displayName: ${{ format('{0}/{1}/gpu={2}', clusterType, osType, parameters.testWithGPU) }}
timeoutInMinutes: 120
cancelTimeoutInMinutes: 5
workspace:
clean: all

variables:
- name: CLUSTER_CONFIG
value: ${{ format('{0}', osType) }}
- name: CLUSTER_TYPE
value: ${{ format('{0}', clusterType) }}
- group: csi-secrets-store-e2e

steps:
- script: |
OS_TYPE=$(echo ${{ osType }} | cut -d '-' -f1 | tr -d '[:space:]')
echo "OS type - $OS_TYPE"
echo "##vso[task.setvariable variable=OS_TYPE]$OS_TYPE"
CONTAINER_RUNTIME=$(echo ${{ osType }} | cut -d '-' -f2 | tr -d '[:space:]')
echo "Container Runtime - $CONTAINER_RUNTIME"
echo "##vso[task.setvariable variable=CONTAINER_RUNTIME]$CONTAINER_RUNTIME"
displayName: 'Determine os type and container runtime'
- script: |
# Download kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
displayName: 'Install kubectl'
- template: build-images.yaml

- ${{ if eq(clusterType, 'aks') }}:
- template: aks-setup.yaml
parameters:
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
testWithGPU: ${{ parameters.testWithGPU }}
containerRuntime: $(CONTAINER_RUNTIME)

- ${{ if eq(clusterType, 'aks-engine') }}:
- template: aks-engine-setup.yaml

- template: assign-user-identity.yaml
parameters:
identitySubscriptionID: $(SUBSCRIPTION_ID)

- template: role-assignment.yaml

# Run e2e tests with Released Version
- ${{ each osType in parameters.osTypes }}:
- job:
displayName: ${{ format('aks_{0}/gpu={1}', osType, parameters.testWithGPU) }}
timeoutInMinutes: 120
cancelTimeoutInMinutes: 5
workspace:
clean: all

variables:
- name: CLUSTER_CONFIG
value: ${{ format('{0}', osType) }}
- group: csi-secrets-store-e2e

steps:
- script: |
OS_TYPE=$(echo ${{ osType }} | cut -d '_' -f1 | tr -d '[:space:]')
echo "OS type: $OS_TYPE"
echo "##vso[task.setvariable variable=OS_TYPE]$OS_TYPE"
CONTAINER_RUNTIME=$(echo ${{ osType }} | cut -d '_' -f2 | tr -d '[:space:]')
echo "Container Runtime: $CONTAINER_RUNTIME"
echo "##vso[task.setvariable variable=CONTAINER_RUNTIME]$CONTAINER_RUNTIME"
displayName: 'Determine os type and container runtime'
- script: |
# Download kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
displayName: 'Install kubectl'
- template: build-images.yaml

- template: aks-setup.yaml
parameters:
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
testWithGPU: ${{ parameters.testWithGPU }}
containerRuntime: $(CONTAINER_RUNTIME)

- template: assign-user-identity.yaml
parameters:
identitySubscriptionID: $(SUBSCRIPTION_ID)

- template: role-assignment.yaml

# Run e2e tests with Released Version
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with Released Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
resetImageVersion: true
isBackwardCompatibilityTest: true
testReleasedVersion: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

# Run e2e tests with New Version
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
isBackwardCompatibilityTest: true
setRegistry: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

- ${{ if eq(parameters.testClusterUpgrade, true) }}:
- template: aks-upgrade.yaml

# Run e2e tests after cluster upgrade
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with Released Version"
testName: "Run e2e test with New Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
resetImageVersion: true
isBackwardCompatibilityTest: true
testReleasedVersion: true
setRegistry: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

# Run e2e tests with New Version
- template: aks-upgrade.yaml

- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
isBackwardCompatibilityTest: true
setRegistry: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

- ${{ if and(parameters.testClusterUpgrade, eq(clusterType, 'aks')) }}:
- template: aks-upgrade.yaml

# Run e2e tests after cluster upgrade
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
setRegistry: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

- template: aks-upgrade.yaml

- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
setRegistry: true
testWithGPU: ${{ parameters.testWithGPU }}
osType: $(OS_TYPE)

- template: cleanup-role-assignments.yaml
- template: teardown.yaml
- template: cleanup-images.yaml
parameters:
imageVersion: $(IMAGE_VERSION)
registryRepo: $(CI_PROVIDER_REPOSITORY)
subscriptionId: $(SUBSCRIPTION_ID)
registryName: $(REGISTRY_NAME)
- template: cleanup-role-assignments.yaml
- template: teardown.yaml
- template: cleanup-images.yaml
parameters:
imageVersion: $(IMAGE_VERSION)
registryRepo: $(CI_PROVIDER_REPOSITORY)
subscriptionId: $(SUBSCRIPTION_ID)
registryName: $(REGISTRY_NAME)
8 changes: 4 additions & 4 deletions .pipelines/templates/e2e-test-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
kind_v1_22_4_helm:
KIND_K8S_VERSION: v1.22.4
IS_HELM_TEST: true
kind_v1_23_0_helm:
KIND_K8S_VERSION: v1.23.0
kind_v1_23_3_helm:
KIND_K8S_VERSION: v1.23.3
IS_HELM_TEST: true
kind_v1_20_7_deployment_manifest:
KIND_K8S_VERSION: v1.20.7
Expand All @@ -34,8 +34,8 @@ jobs:
kind_v1_22_4_deployment_manifest:
KIND_K8S_VERSION: v1.22.4
IS_HELM_TEST: false
kind_v1_23_0_deployment_manifest:
KIND_K8S_VERSION: v1.23.0
kind_v1_23_3_deployment_manifest:
KIND_K8S_VERSION: v1.23.3
IS_HELM_TEST: false

steps:
Expand Down
3 changes: 0 additions & 3 deletions .pipelines/templates/teardown.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
steps:
- script: |
if [[ $CLUSTER_TYPE == "aks-engine" ]]; then
rm ${LOCAL_SSH_KEY}*
fi
az login -i > /dev/null
echo "deleting '${AZURE_CLUSTER_NAME}' resource group"
az group delete -n ${AZURE_CLUSTER_NAME} --subscription $(SUBSCRIPTION_ID) --yes --no-wait
Expand Down
Loading

0 comments on commit cdfff93

Please sign in to comment.