From c2e7f7c369dd0f2103673e72f3c2f7252f646ef7 Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Tue, 7 Dec 2021 16:48:30 -0800 Subject: [PATCH 1/7] windows dualstack pipeline --- .pipelines/pipeline.yaml | 13 +- .../e2e-dualstack-job-template.yaml | 154 ++++++++++++++++++ test/apimodels/cniWindowsDualstack2004.json | 68 ++++++++ 3 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 .pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml create mode 100644 test/apimodels/cniWindowsDualstack2004.json diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index c541b568fa..967e0e8a6a 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -36,7 +36,7 @@ stages: - template: windows-image.yaml - stage: build_and_test - displayName: ACN + displayName: Build ACN and Test dependsOn: - "setup" jobs: @@ -240,6 +240,16 @@ stages: clusterDefinitionCniBuildOS: "windows" clusterDefinitionCniBuildExt: ".zip" + - template: singletenancy/aks-engine/e2e-dualstack-job-template.yaml + parameters: + name: "windows_20_04_dualstack_e2e" + displayName: "Windows 20.04 Dualstack" + pipelineBuildImage: "$(BUILD_IMAGE)" + clusterDefinition: "cniWindowsDualstack2004.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" + - stage: cleanup displayName: Cleanup dependsOn: @@ -247,6 +257,7 @@ stages: - "ubuntu_18_04_linux_e2e" - "windows_19_03_e2e" - "windows_20_04_e2e" + - "windows_20_04_dualstack_e2e" jobs: - job: delete_remote_artifacts displayName: Delete remote artifacts diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml new file mode 100644 index 0000000000..b03f8027e6 --- /dev/null +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -0,0 +1,154 @@ +parameters: + name: "" + displayName: "" + pipelineBuildImage: "$(BUILD_IMAGE)" + clusterDefinition: "" + clusterDefinitionCniTypeKey: "" + clusterDefinitionCniBuildOS: "" + clusterDefinitionCniBuildExt: "" + +stages: + - stage: ${{ parameters.name }} + displayName: E2E - ${{ parameters.displayName }} + dependsOn: + - setup + - build_and_test + jobs: + - job: Create_cluster + displayName: Create Dualstack cluster + timeoutInMinutes: 120 + pool: + name: $(BUILD_POOL_NAME_DEFAULT) + demands: + - agent.os -equals Linux + - Role -equals Build + container: + image: mcr.microsoft.com/oss/azcu/go-dev:$(GO_DEV_IMAGE_TAG) + variables: + GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path + GOBIN: "$(GOPATH)/bin" # Go binaries path + acnPath: "$(GOPATH)/src/github.com/Azure/azure-container-networking" + Tag: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ] + CommitHash: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.CommitHash'] ] + StorageID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] + steps: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + artifactName: clusterdefinitions + targetPath: $(Pipeline.Workspace) + - bash: | + ls -lah + 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 + echo Tag is $(Tag) + echo CNI_URL is $CNI_URL + echo Config: '${{ parameters.clusterDefinition }}' + cat '${{ parameters.clusterDefinition }}' + cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp + cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}' + mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}' + echo "Running E2E tests against a cluster built with the following API model:" + cp ${{ parameters.clusterDefinition }} clusterDefinition.json + displayName: "Configure AKS-Engine Cluster definition" + workingDirectory: $(Pipeline.Workspace) + - bash: | + echo Currently set AKS-Engine Version '$(AKS_ENGINE_VERSION)' + if [ -z '$(AKS_ENGINE_VERSION)' ] + then + echo Found set AKS-Engine version '$(AKS_ENGINE_VERSION)'... + export aksEVersion='$(AKS_ENGINE_VERSION)' + else + echo No AKS-Engine version set, using latest... + export aksEVersion=$(curl -L -s -H 'Accept: application/json' https://github.com/Azure/aks-engine/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') + fi + echo Using AKS-Engine version $aksEVersion + + # download binary + #wget https://github.com/Azure/aks-engine/releases/download/$aksEVersion/aks-engine-$aksEVersion-linux-amd64.tar.gz + wget https://github.com/tamilmani1989/aks-engine/releases/download/v1.1.0/aks-engine-tamanoha-linux-amd64.tar.gz + rm -rf ./dualstack-ws + mkdir ./dualstack-ws + + #extract binary + #tar -zxvf aks-engine-$aksEVersion-linux-amd64.tar.gz -C dualstack-ws + tar -zxvf aks-engine-tamanoha-linux-amd64.tar.gz -C dualstack-ws + mv ./dualstack-ws/aks-engine-*/* ./dualstack-ws/ + ls -l ./dualstack-ws + ./dualstack-ws/aks-engine version + displayName: "Install aks-engine binary" + + - task: AzureCLI@1 + inputs: + azureSubscription: $(AKS_ENGINE_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + addSpnToEnvironment: true + inlineScript: | + RG=kubernetes-$(echo "dualstack-e2e-`date "+%Y-%m-%d-%S"`") + echo "##vso[task.setvariable variable=RESOURCE_GROUP;isOutput=true;]$RG" + region=$(echo $(AKS_ENGINE_REGION)|cut -d',' -f1) + echo "running: ./dualstack-ws/aks-engine deploy -m $(Pipeline.Workspace)/clusterDefinition.json --location $region -g $RG --subscription-id $(AKS_ENGINE_SUBSCRIPTION_ID) --client-id $servicePrincipalId --client-secret $servicePrincipalKey --output-directory ./dualstack-ws/kubeoutput" + ./dualstack-ws/aks-engine deploy -m $(Pipeline.Workspace)/clusterDefinition.json --location $region -g $RG --subscription-id $(AKS_ENGINE_SUBSCRIPTION_ID) --client-id $servicePrincipalId --client-secret $servicePrincipalKey --output-directory ./dualstack-ws/kubeoutput --auto-suffix + mv ./dualstack-ws/kubeoutput/kubeconfig/kubeconfig.* ./dualstack-ws/kubeoutput/kubeconfig/kubeconfig.json + name: DeployAKSEngine + displayName: "Deploy aks-engine cluster" + - publish: ./dualstack-ws/kubeoutput + artifact: kubeoutput + + - job: Build_kubernetes + displayName: Build kubernetes upstream + timeoutInMinutes: 120 + pool: + name: $(BUILD_POOL_NAME_DEFAULT) + demands: + - agent.os -equals Linux + - Role -equals Build + steps: + - bash: | + git clone https://github.com/kubernetes/kubernetes.git + cd kubernetes + export PATH=$PATH:/usr/local/go/bin/ + make WHAT=test/e2e/e2e.test + displayName: 'Build Kubernetes e2e.test' + - publish: $(System.DefaultWorkingDirectory)/kubernetes/_output/local/bin/linux/amd64 + artifact: Test + + - job: Run_test + displayName: Run upstream e2e test + dependsOn: [Create_cluster, Build_kubernetes] + timeoutInMinutes: 120 + pool: + name: $(BUILD_POOL_NAME_DEFAULT) + demands: + - agent.os -equals Linux + - Role -equals Build + variables: + RESOURCE_GROUP: $[ dependencies.Create_cluster.outputs['DeployAKSEngine.RESOURCE_GROUP'] ] + steps: + - checkout: none + - download: current + artifact: Test + - download: current + artifact: kubeoutput + - bash: | + echo "rgname is:$(RESOURCE_GROUP)" + chmod +x $(Pipeline.Workspace)/Test/e2e.test + echo "os: ${{ parameters.clusterDefinitionCniBuildOS }}" + if [ "${{ parameters.clusterDefinitionCniBuildOS }}" == "windows" ]; then + echo "Skip LinuxOnly Tests" + $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + else + echo "Skip SCTP Tests" + $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + displayName: "Run Test Suite" + - task: AzureCLI@2 + displayName: "Delete Test Cluster Resource Group" + condition: always() + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptType: 'bash' + scriptLocation: 'inlineScript' + inlineScript: | + echo "Deleting: $(RESOURCE_GROUP)" + az group delete -n $(RESOURCE_GROUP) --yes \ No newline at end of file diff --git a/test/apimodels/cniWindowsDualstack2004.json b/test/apimodels/cniWindowsDualstack2004.json new file mode 100644 index 0000000000..0a4648a72f --- /dev/null +++ b/test/apimodels/cniWindowsDualstack2004.json @@ -0,0 +1,68 @@ +{ + "apiVersion": "vlabs", + "properties": { + "featureFlags": { + "enableIPv6DualStack": true + }, + "orchestratorProfile": { + "orchestratorType": "Kubernetes", + "orchestratorRelease": "1.21", + "kubernetesConfig": { + "loadBalancerSku": "Standard", + "excludeMasterFromStandardLB": true, + "clusterSubnet": "10.240.0.0/12,fc00::/48", + "serviceCidr": "10.0.0.0/16,fd00::/108", + "dnsServiceIP": "10.0.0.10", + "networkPlugin": "azure", + "apiServerConfig": { + "--feature-gates": "IPv6DualStack=true", + "--tls-min-version": "VersionTLS12", + "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + + }, + "kubeletConfig": { + "--feature-gates": "IPv6DualStack=true" + }, + "controllerManagerConfig": { + "--feature-gates": "IPv6DualStack=true" + } + } + }, + "masterProfile": { + "count": 1, + "dnsPrefix": "windual", + "vmSize": "Standard_D2_v2" + }, + "agentPoolProfiles": [ + { + "name": "cnidualwin", + "count": 3, + "vmSize": "Standard_D2_v2", + "availabilityProfile": "AvailabilitySet", + "osType": "Windows" + } + ], + "linuxProfile": { + "adminUsername": "azureuser", + "ssh": { + "publicKeys": [ + { + "keyData":"" + } + ] + } + }, + "windowsProfile": { + "adminUsername": "azureuser", + "adminPassword": "azureTest@!", + "windowsPublisher": "MicrosoftWindowsServer", + "windowsOffer": "WindowsServer", + "windowsSku": "Datacenter-Core-2004-with-Containers-smalldisk", + "imageVersion": "latest" + }, + "servicePrincipalProfile": { + "clientId":"", + "secret":"" + } + } +} From b1efbf2b736dc31f3c58848962ee7173b7063a5b Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Tue, 7 Dec 2021 16:56:27 -0800 Subject: [PATCH 2/7] temporarily commented build images and tests --- .pipelines/pipeline.yaml | 224 +++++++++++++++++++-------------------- 1 file changed, 112 insertions(+), 112 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 967e0e8a6a..acbbe8912f 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -89,118 +89,118 @@ stages: - publish: ./test/apimodels/ artifact: clusterdefinitions - - job: build_images - displayName: Build Images - variables: - TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ] - pool: - name: "$(BUILD_POOL_NAME_DEFAULT)" - steps: - - task: Docker@2 - displayName: Docker Login - inputs: - containerRegistry: $(ACR_SERVICE_CONNECTION) - command: 'login' - addPipelineData: false - - - script: | - echo Tag is $(TAG) - sudo make tools-images VERSION=$(TAG) - docker run --privileged --rm tonistiigi/binfmt --install arm64 - make all-images VERSION=$(TAG) - name: "BuildImages" - displayName: "Build Images" - - - script: | - wget https://github.com/aquasecurity/trivy/releases/download/v0.18.1/trivy_0.18.1_Linux-64bit.tar.gz - tar -zxvf trivy*.tar.gz - mkdir -p ./trivy-cache - sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-npm:$(TAG) - sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-cns:$(TAG) - sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-cni-manager:$(TAG) - name: "TrivyScan" - displayName: "Image Vulnerability Scan" - - - script: | - docker tag $IMAGE_REGISTRY/azure-cni-manager:$(TAG) $IMAGE_REGISTRY/azure-cni-manager:$(TAG) - docker push $IMAGE_REGISTRY/azure-cni-manager:$(TAG) - - function auto-retry() - { - export i="1" - export attempts="300" - false - while [[ $? -ne 0 ]] && [[ $i -lt $attempts ]]; do - printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false - done - } - - auto-retry docker pull $IMAGE_REGISTRY/azure-npm:$(TAG) - auto-retry docker pull $IMAGE_REGISTRY/azure-cns:$(TAG) - auto-retry docker pull $IMAGE_REGISTRY/azure-cni-manager:$(TAG) - name: "mcrreplication" - displayName: "Push NPM Image and Wait for Repository" - - - task: Docker@2 - displayName: Docker Logout - inputs: - containerRegistry: $(ACR_SERVICE_CONNECTION) - command: 'logout' - addPipelineData: false - - - task: CopyFiles@2 - inputs: - sourceFolder: "output" - targetFolder: $(Build.ArtifactStagingDirectory) - condition: succeeded() - - - task: PublishBuildArtifacts@1 - inputs: - artifactName: "output" - pathtoPublish: "$(Build.ArtifactStagingDirectory)" - condition: succeeded() - - - job: test - displayName: Run Tests - variables: - STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] - pool: - name: "$(BUILD_POOL_NAME_DEFAULT)" - steps: - - - script: | - make tools - # run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout - { { { { - sudo -E env "PATH=$PATH" make test-all; - echo $? >&3; - } | tee >(build/tools/bin/go-junit-report > report.xml) >&4; - } 3>&1; - } | { read xs; exit $xs; } - } 4>&1 - name: "Test" - displayName: "Run Tests" - - - bash: | - build/tools/bin/gocov convert coverage.out > coverage.json - build/tools/bin/gocov-xml < coverage.json > coverage.xml - name: "Coverage" - displayName: "Generate Coverage Reports" - condition: always() - - - task: PublishTestResults@2 - inputs: - testRunner: JUnit - testResultsFiles: report.xml - displayName: "Publish Test Results" - condition: always() - - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: coverage.xml - displayName: "Publish Code Coverage Results" - condition: always() +# - job: build_images +# displayName: Build Images +# variables: +# TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ] +# pool: +# name: "$(BUILD_POOL_NAME_DEFAULT)" +# steps: +# - task: Docker@2 +# displayName: Docker Login +# inputs: +# containerRegistry: $(ACR_SERVICE_CONNECTION) +# command: 'login' +# addPipelineData: false +# +# - script: | +# echo Tag is $(TAG) +# sudo make tools-images VERSION=$(TAG) +# docker run --privileged --rm tonistiigi/binfmt --install arm64 +# make all-images VERSION=$(TAG) +# name: "BuildImages" +# displayName: "Build Images" +# +# - script: | +# wget https://github.com/aquasecurity/trivy/releases/download/v0.18.1/trivy_0.18.1_Linux-64bit.tar.gz +# tar -zxvf trivy*.tar.gz +# mkdir -p ./trivy-cache +# sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-npm:$(TAG) +# sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-cns:$(TAG) +# sudo ./trivy --exit-code 1 --cache-dir ./trivy-cache --severity HIGH,CRITICAL $IMAGE_REGISTRY/azure-cni-manager:$(TAG) +# name: "TrivyScan" +# displayName: "Image Vulnerability Scan" +# +# - script: | +# docker tag $IMAGE_REGISTRY/azure-cni-manager:$(TAG) $IMAGE_REGISTRY/azure-cni-manager:$(TAG) +# docker push $IMAGE_REGISTRY/azure-cni-manager:$(TAG) +# +# function auto-retry() +# { +# export i="1" +# export attempts="300" +# false +# while [[ $? -ne 0 ]] && [[ $i -lt $attempts ]]; do +# printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false +# done +# } +# +# auto-retry docker pull $IMAGE_REGISTRY/azure-npm:$(TAG) +# auto-retry docker pull $IMAGE_REGISTRY/azure-cns:$(TAG) +# auto-retry docker pull $IMAGE_REGISTRY/azure-cni-manager:$(TAG) +# name: "mcrreplication" +# displayName: "Push NPM Image and Wait for Repository" +# +# - task: Docker@2 +# displayName: Docker Logout +# inputs: +# containerRegistry: $(ACR_SERVICE_CONNECTION) +# command: 'logout' +# addPipelineData: false +# +# - task: CopyFiles@2 +# inputs: +# sourceFolder: "output" +# targetFolder: $(Build.ArtifactStagingDirectory) +# condition: succeeded() +# +# - task: PublishBuildArtifacts@1 +# inputs: +# artifactName: "output" +# pathtoPublish: "$(Build.ArtifactStagingDirectory)" +# condition: succeeded() +# +# - job: test +# displayName: Run Tests +# variables: +# STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ] +# pool: +# name: "$(BUILD_POOL_NAME_DEFAULT)" +# steps: +# +# - script: | +# make tools +# # run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml), stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code. Read all output from fd 4 (output from tee) and write to top stdout +# { { { { +# sudo -E env "PATH=$PATH" make test-all; +# echo $? >&3; +# } | tee >(build/tools/bin/go-junit-report > report.xml) >&4; +# } 3>&1; +# } | { read xs; exit $xs; } +# } 4>&1 +# name: "Test" +# displayName: "Run Tests" +# +# - bash: | +# build/tools/bin/gocov convert coverage.out > coverage.json +# build/tools/bin/gocov-xml < coverage.json > coverage.xml +# name: "Coverage" +# displayName: "Generate Coverage Reports" +# condition: always() +# +# - task: PublishTestResults@2 +# inputs: +# testRunner: JUnit +# testResultsFiles: report.xml +# displayName: "Publish Test Results" +# condition: always() +# +# - task: PublishCodeCoverageResults@1 +# inputs: +# codeCoverageTool: Cobertura +# summaryFileLocation: coverage.xml +# displayName: "Publish Code Coverage Results" +# condition: always() - template: singletenancy/aks-swift/e2e-job-template.yaml parameters: From ccbc7694e3623cfe96c0671351595657afe3b4b5 Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Tue, 7 Dec 2021 17:26:09 -0800 Subject: [PATCH 3/7] fixed if else --- .../singletenancy/aks-engine/e2e-dualstack-job-template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml index b03f8027e6..c25f8a161a 100644 --- a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -141,6 +141,7 @@ stages: else echo "Skip SCTP Tests" $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + fi displayName: "Run Test Suite" - task: AzureCLI@2 displayName: "Delete Test Cluster Resource Group" From 599a4b1d93031e63795129b24010fba7d7d956ae Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Fri, 10 Dec 2021 13:10:37 -0800 Subject: [PATCH 4/7] adding back change removed wrongly due to conflict --- .pipelines/pipeline.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 0abf23964f..ab19cd89ce 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -89,6 +89,20 @@ stages: - publish: ./test/apimodels/ artifact: clusterdefinitions + - job: build_images + displayName: Build Images + variables: + TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ] + pool: + name: "$(BUILD_POOL_NAME_DEFAULT)" + steps: + - task: Docker@2 + displayName: Docker Login + inputs: + containerRegistry: $(ACR_SERVICE_CONNECTION) + command: 'login' + addPipelineData: false + - script: | echo Tag is $(TAG) sudo make tools-images VERSION=$(TAG) From 1cf3f7a4dab7b22a18c5abee694640e16193739a Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Fri, 10 Dec 2021 15:31:33 -0800 Subject: [PATCH 5/7] updated artifact name --- .pipelines/pipeline.yaml | 2 +- .../aks-engine/e2e-dualstack-job-template.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index ab19cd89ce..cce680f5e9 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -102,7 +102,7 @@ stages: containerRegistry: $(ACR_SERVICE_CONNECTION) command: 'login' addPipelineData: false - + - script: | echo Tag is $(TAG) sudo make tools-images VERSION=$(TAG) diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml index 3f95d4879e..55c66c3753 100644 --- a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -94,7 +94,7 @@ stages: name: DeployAKSEngine displayName: "Deploy aks-engine cluster" - publish: ./dualstack-ws/kubeoutput - artifact: kubeoutput + artifact: kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }} - job: Build_kubernetes displayName: Build kubernetes upstream @@ -112,7 +112,7 @@ stages: make WHAT=test/e2e/e2e.test displayName: 'Build Kubernetes e2e.test' - publish: $(System.DefaultWorkingDirectory)/kubernetes/_output/local/bin/linux/amd64 - artifact: Test + artifact: Test-${{ parameters.clusterDefinitionCniBuildOS }} - job: Run_test displayName: Run upstream e2e test @@ -137,10 +137,10 @@ stages: echo "os: ${{ parameters.clusterDefinitionCniBuildOS }}" if [ "${{ parameters.clusterDefinitionCniBuildOS }}" == "windows" ]; then echo "Skip LinuxOnly Tests" - $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + $(Pipeline.Workspace)/Test-$(Build.BuildNumber)/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-$(Build.BuildNumber)/kubeconfig/kubeconfig.json else echo "Skip SCTP Tests" - $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + $(Pipeline.Workspace)/Test-$(Build.BuildNumber)/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-$(Build.BuildNumber)/kubeconfig/kubeconfig.json fi displayName: "Run Test Suite" - task: AzureCLI@2 From aed5e52eb73750165430acb7dc6b2ec294478f43 Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Fri, 10 Dec 2021 16:09:41 -0800 Subject: [PATCH 6/7] updated rg name based on OS --- .../singletenancy/aks-engine/e2e-dualstack-job-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml index 55c66c3753..e1eb237df8 100644 --- a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -85,7 +85,7 @@ stages: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - RG=kubernetes-$(echo "dualstack-e2e-`date "+%Y-%m-%d-%S"`") + RG=kubernetes-$(echo "kubeds-e2e-${{ parameters.clusterDefinitionCniBuildOS }}-`date "+%Y-%m-%d-%S"`") echo "##vso[task.setvariable variable=RESOURCE_GROUP;isOutput=true;]$RG" region=$(echo $(AKS_ENGINE_REGION)|cut -d',' -f1) echo "running: ./dualstack-ws/aks-engine deploy -m $(Pipeline.Workspace)/clusterDefinition.json --location $region -g $RG --subscription-id $(AKS_ENGINE_SUBSCRIPTION_ID) --client-id $servicePrincipalId --client-secret $servicePrincipalKey --output-directory ./dualstack-ws/kubeoutput" From cea69e9b0e44be7b8d75d7c3c21312a43785280e Mon Sep 17 00:00:00 2001 From: Tamilmani Manoharan Date: Fri, 10 Dec 2021 16:57:55 -0800 Subject: [PATCH 7/7] updated cluster name and artifacts --- .../aks-engine/e2e-dualstack-job-template.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml index e1eb237df8..919526bde0 100644 --- a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -85,7 +85,7 @@ stages: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - RG=kubernetes-$(echo "kubeds-e2e-${{ parameters.clusterDefinitionCniBuildOS }}-`date "+%Y-%m-%d-%S"`") + RG=kubedual-$(echo "e2e-${{ parameters.clusterDefinitionCniBuildOS }}-`date "+%Y-%m-%d-%S"`") echo "##vso[task.setvariable variable=RESOURCE_GROUP;isOutput=true;]$RG" region=$(echo $(AKS_ENGINE_REGION)|cut -d',' -f1) echo "running: ./dualstack-ws/aks-engine deploy -m $(Pipeline.Workspace)/clusterDefinition.json --location $region -g $RG --subscription-id $(AKS_ENGINE_SUBSCRIPTION_ID) --client-id $servicePrincipalId --client-secret $servicePrincipalKey --output-directory ./dualstack-ws/kubeoutput" @@ -128,19 +128,19 @@ stages: steps: - checkout: none - download: current - artifact: Test + artifact: Test-${{ parameters.clusterDefinitionCniBuildOS }} - download: current - artifact: kubeoutput + artifact: kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }} - bash: | echo "rgname is:$(RESOURCE_GROUP)" - chmod +x $(Pipeline.Workspace)/Test/e2e.test + chmod +x $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test echo "os: ${{ parameters.clusterDefinitionCniBuildOS }}" if [ "${{ parameters.clusterDefinitionCniBuildOS }}" == "windows" ]; then echo "Skip LinuxOnly Tests" - $(Pipeline.Workspace)/Test-$(Build.BuildNumber)/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-$(Build.BuildNumber)/kubeconfig/kubeconfig.json + $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }}/kubeconfig/kubeconfig.json else echo "Skip SCTP Tests" - $(Pipeline.Workspace)/Test-$(Build.BuildNumber)/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-$(Build.BuildNumber)/kubeconfig/kubeconfig.json + $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }}/kubeconfig/kubeconfig.json fi displayName: "Run Test Suite" - task: AzureCLI@2