Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: adds e2e test for containerd on windows #612

Merged
merged 36 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9b8807d
ci: adds e2e test for containerd on windows
nilekhc Aug 17, 2021
5f571d3
ci: fixes syntax
nilekhc Aug 17, 2021
a47b7c1
ci: fixes template param
nilekhc Aug 17, 2021
0a60bf8
test: debug
nilekhc Aug 18, 2021
c98508d
test: debug
nilekhc Aug 18, 2021
0a0996f
test: debug
nilekhc Aug 18, 2021
e5f94fb
test: debug
nilekhc Aug 18, 2021
f14c1bc
test: debug
nilekhc Aug 18, 2021
aed7784
test: tr
nilekhc Aug 18, 2021
9ab7c88
test: sets env var
nilekhc Aug 18, 2021
f290050
test: fix syntax
nilekhc Aug 18, 2021
6e7a41b
test:revert change
nilekhc Aug 18, 2021
a923f0b
test: revert runtime
nilekhc Aug 19, 2021
9baad48
test: manual export
nilekhc Aug 19, 2021
93880d6
Merge branch 'master' of https://github.com/nilekhc/secrets-store-csi…
nilekhc Aug 23, 2021
aea17f8
test: os params
nilekhc Aug 23, 2021
f6625f0
ci: fixes syntax
nilekhc Aug 23, 2021
3d25903
ci: fixes os type
nilekhc Aug 23, 2021
ea99854
test: enables containerd tests
nilekhc Aug 23, 2021
8f80caa
test: fixes windows nodepool
nilekhc Aug 24, 2021
e339dc3
test: adds debug logs
nilekhc Aug 24, 2021
871d2f6
test: debug
nilekhc Aug 24, 2021
b1d865d
ci: enables az aks-preview
nilekhc Aug 24, 2021
f425dd2
ci: removes debug statement
nilekhc Aug 24, 2021
43aaa85
test: exports OS_TYPE
nilekhc Aug 25, 2021
eb697dc
test: removes dead code
nilekhc Aug 25, 2021
d0180ce
test: removes osType param
nilekhc Aug 25, 2021
b9779bc
ci: removes osTypes
nilekhc Aug 25, 2021
55b6ccc
chore: removes comments
nilekhc Aug 25, 2021
1e20d3b
ci: seperates aks and aks-engine jobs
nilekhc Aug 25, 2021
f371337
Merge branch 'master' into containerd-test
aramase Aug 31, 2021
c929a33
Merge branch 'master' of https://github.com/nilekhc/secrets-store-csi…
nilekhc Aug 31, 2021
5e6146b
Merge branch 'containerd-test' of https://github.com/nilekhc/secrets-…
nilekhc Aug 31, 2021
266dbc7
Merge branch 'master' into containerd-test
aramase Aug 31, 2021
af1eb38
Merge branch 'master' of https://github.com/nilekhc/secrets-store-csi…
nilekhc Aug 31, 2021
a95bd22
Merge branch 'containerd-test' of https://github.com/nilekhc/secrets-…
nilekhc Aug 31, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .pipelines/e2e-job-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
parameters:
clusterTypes:
- "aks"
osTypes:
- "linux"
- "windows-docker"
- "windows-containerd"
- template: templates/e2e-test-azure.yaml
parameters:
clusterTypes:
- "aks-engine"
osTypes:
- "linux"
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/aks-engine-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks-engine'))

- script: |
envsubst < test/e2e/cluster_configs/$(CLUSTER_CONFIG).json > cluster.json
envsubst < test/e2e/cluster_configs/$(OS_TYPE).json > cluster.json
displayName: "Build AKS-Engine API Model"
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks-engine'))

Expand Down
21 changes: 12 additions & 9 deletions .pipelines/templates/aks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ parameters:
- name: testWithGPU
type: boolean
default: false
- name: containerRuntime
type: string

steps:
- script: |
Expand Down Expand Up @@ -37,8 +39,8 @@ steps:
condition: and(succeeded(), eq(variables['CLUSTER_TYPE'], 'aks'))

- ${{ if eq(parameters.testClusterUpgrade, true) }}:
#Overrride AKS_INSTALL_VERSION if testing with k8s upgrade
#If we are running test with cluster upgrade, start with minimum possible non preview version.
# Overrride AKS_INSTALL_VERSION if testing with k8s upgrade
# If we are running test with cluster upgrade, start with minimum possible non preview version.
- script: |
aksVersion=$(az aks get-versions -l $(AZURE_LOCATION) --query "min(orchestrators[?isPreview==null].orchestratorVersion)" -otsv)
echo "AKS Install version - $aksVersion"
Expand Down Expand Up @@ -74,13 +76,14 @@ steps:
echo "##vso[task.setvariable variable=MASTERIP]${MASTERIP}"
echo "##vso[task.setvariable variable=MASTERINTERNALIP]${MASTERIP}"

if [[ $CLUSTER_CONFIG == "windows" ]]; then
az aks nodepool add \
-g ${AZURE_CLUSTER_NAME} \
--cluster-name ${AZURE_CLUSTER_NAME} \
--os-type Windows \
--name win \
--node-count 1
if [[ "$(OS_TYPE)" == "windows" ]]; then
if [[ ${{ parameters.containerRuntime }} == "containerd" ]]; then
az extension add --name aks-preview
az extension update --name aks-preview
EXTRA_ARGS="--aks-custom-headers WindowsContainerRuntime=containerd"
fi

az aks nodepool add -g ${AZURE_CLUSTER_NAME} --cluster-name ${AZURE_CLUSTER_NAME} --os-type Windows --name win --node-count 1 ${EXTRA_ARGS:-} > /dev/null
fi

# store kubeconfig
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- script: |
# Generate image version
if [[ -n "${CLUSTER_CONFIG:-}" ]]; then
IMAGE_VERSION="$(git describe --tags --always --dirty)-$(CLUSTER_TYPE)-$(CLUSTER_CONFIG)"
IMAGE_VERSION="$(git describe --tags --always --dirty)-$(CLUSTER_TYPE)-$(OS_TYPE)"
else
IMAGE_VERSION="$(git describe --tags --always --dirty)-$(CLUSTER_TYPE)-load"
fi
Expand Down
15 changes: 11 additions & 4 deletions .pipelines/templates/e2e-test-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
- task: GoTool@0
inputs:
version: 1.16

- 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
Expand All @@ -46,6 +56,7 @@ jobs:
parameters:
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
testWithGPU: ${{ parameters.testWithGPU }}
containerRuntime: $(CONTAINER_RUNTIME)

- ${{ if eq(clusterType, 'aks-engine') }}:
- template: aks-engine-setup.yaml
Expand All @@ -58,7 +69,6 @@ jobs:
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with Released Version"
osType: ${{ osType }}
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
resetImageVersion: true
isBackwardCompatibilityTest: true
Expand All @@ -68,7 +78,6 @@ jobs:
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
osType: ${{ osType }}
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
isBackwardCompatibilityTest: true
setRegistry: true
Expand All @@ -80,7 +89,6 @@ jobs:
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
osType: ${{ osType }}
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
setRegistry: true

Expand All @@ -89,7 +97,6 @@ jobs:
- template: e2e-test.yaml
parameters:
testName: "Run e2e test with New Version"
osType: ${{ osType }}
testClusterUpgrade: ${{ parameters.testClusterUpgrade }}
setRegistry: true

Expand Down
9 changes: 5 additions & 4 deletions .pipelines/templates/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
parameters:
- name: testName
type: string
- name: osType
type: string
- name: testReleasedVersion
type: boolean
default: false
Expand All @@ -21,6 +19,11 @@ parameters:

steps:
- script: |
# Set TEST_WiNDOWS=true to run the test on Windows
if [ "$(OS_TYPE)" == "windows" ] ; then
export TEST_WINDOWS=true
fi

if [ "${{ parameters.setRegistry }}" == True ] ; then
export REGISTRY="${REGISTRY:-$(REGISTRY_NAME).azurecr.io/k8s/csi/secrets-store}"
fi
Expand Down Expand Up @@ -49,5 +52,3 @@ steps:
CONFIG_IMAGE_VERSION: ""
${{ if parameters.isBackwardCompatibilityTest }}:
IS_BACKWARD_COMPATIBILITY_TEST: ${{ parameters.isBackwardCompatibilityTest }}
${{ if eq(parameters.osType, 'windows') }}:
TEST_WINDOWS: true