Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pipelines/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
jobs:
- job: ${{ parameters.name }}
dependsOn: unit_tests
timeoutInMinutes: 90
timeoutInMinutes: 120
pool:
name: Networking-ContainerNetworking
demands: agent.os -equals Linux
Expand All @@ -22,6 +22,7 @@ jobs:
acnPath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
Tag: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.Tag'] ]
CommitHash: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.CommitHash'] ]
StorageID: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.StorageID'] ]
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
steps:
Expand Down
10 changes: 3 additions & 7 deletions .pipelines/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ steps:
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'

go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...

Expand All @@ -40,14 +39,11 @@ steps:

# download binary
wget https://github.com/Azure/aks-engine/releases/download/$aksEVersion/aks-engine-$aksEVersion-linux-amd64.tar.gz

mkdir ./bin

#extract binary
tar -zxvf aks-engine-$aksEVersion-linux-amd64.tar.gz -C bin

mv ./bin/aks-engine-*/* ./bin/

echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
name: "GoEnv"
Expand All @@ -63,7 +59,7 @@ steps:

- bash: |
ls -lah
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(CommitHash)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }}
export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }}
export CNI_TYPE=${{ parameters.clusterDefinitionCniTypeKey }}
echo CNI type is $CNI_TYPE
cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp #
Expand All @@ -73,8 +69,8 @@ steps:
echo "Running E2E tests against a cluster built with the following API model:"
cat '${{ parameters.clusterDefinition }}'
cp ${{ parameters.clusterDefinition }} clusterDefinition.json
curl -L https://dl.k8s.io/v1.16.0/kubernetes-client-linux-amd64.tar.gz | tar xvzf -
sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl
curl -L https://dl.k8s.io/v1.17.4/kubernetes-client-linux-amd64.tar.gz | tar xvzf -
sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl
sudo cp kubernetes/client/bin/kubectl /usr/local/bin/k
displayName: Configure AKS-Engine
workingDirectory: "$(modulePath)"
Expand Down
15 changes: 9 additions & 6 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ stages:
displayName: "Set up the Go environment"

- script: |
BUILD_NUMBER=$(Build.BuildNumber)
echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})"
echo "##vso[task.setvariable variable=CommitHash;isOutput=true]$(git rev-parse HEAD)"
echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --always --dirty)"
export BRANCH=$(Build.SourceBranchName)
Expand Down Expand Up @@ -168,9 +170,9 @@ stages:
azureSubscription: $(ARTIFACT_SUBSCRIPTION)
scriptLocation: "inlineScript"
inlineScript: |
echo Creating storage container with name acn-$(EnvironmentalVariables.CommitHash) and account name $(STORAGE_ACCOUNT_NAME)
az storage container create -n acn-$(EnvironmentalVariables.CommitHash) --account-name $(STORAGE_ACCOUNT_NAME) --public-access container
az storage blob upload-batch -d acn-$(EnvironmentalVariables.CommitHash) -s ./output/ --account-name $(STORAGE_ACCOUNT_NAME)
echo Creating storage container with name acn-$(EnvironmentalVariables.StorageID) and account name $(STORAGE_ACCOUNT_NAME)
az storage container create -n acn-$(EnvironmentalVariables.StorageID) --account-name $(STORAGE_ACCOUNT_NAME) --public-access container
az storage blob upload-batch -d acn-$(EnvironmentalVariables.StorageID) -s ./output/ --account-name $(STORAGE_ACCOUNT_NAME)
workingDirectory: "$(modulePath)"
displayName: Create artifact storage container
condition: succeeded()
Expand Down Expand Up @@ -226,8 +228,9 @@ stages:
azureSubscription: $(ARTIFACT_SUBSCRIPTION)
scriptLocation: "inlineScript"
inlineScript: |
export CommitHash=$(git rev-parse HEAD)
echo Deleting storage container with name acn-$CommitHash and account name $(STORAGE_ACCOUNT_NAME)
az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME)
BUILD_NUMBER=$(Build.BuildNumber)
BUILD_NUMBER=${BUILD_NUMBER//./-}
echo Deleting storage container with name acn-$BUILD_NUMBER and account name $(STORAGE_ACCOUNT_NAME)
az storage container delete -n acn-$BUILD_NUMBER --account-name $(STORAGE_ACCOUNT_NAME)
workingDirectory: "$(modulePath)"
displayName: Cleanup remote Azure storage container
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/cniLinux1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.16",
"orchestratorRelease": "1.17",
"kubernetesConfig": {
"networkPlugin": "azure",
"networkPolicy": "azure",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/cniLinux1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.16",
"orchestratorRelease": "1.17",
"kubernetesConfig": {
"networkPlugin": "azure",
"networkPolicy": "azure",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/cniWindows1809.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.16",
"orchestratorRelease": "1.17",
"kubernetesConfig": {
"networkPlugin": "azure",
"networkPolicy": "azure",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/cniWindows1903.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.16",
"orchestratorRelease": "1.17",
"kubernetesConfig": {
"networkPlugin": "azure",
"networkPolicy": "azure",
Expand Down