From 0b5ac63f6edd6b792a25e44f402772aacd49663d Mon Sep 17 00:00:00 2001 From: Anton Evseev Date: Tue, 9 Apr 2019 14:35:36 +0300 Subject: [PATCH 1/2] Move Network validation config to azure-pipelines.yml --- .azure-pipelines/network-validation.yml | 22 -------------- azure-pipelines.yml | 38 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 22 deletions(-) delete mode 100644 .azure-pipelines/network-validation.yml diff --git a/.azure-pipelines/network-validation.yml b/.azure-pipelines/network-validation.yml deleted file mode 100644 index b43a911a607c..000000000000 --- a/.azure-pipelines/network-validation.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: - branches: - include: - - network-* - paths: - include: - - specification/network/* - -pool: - vmImage: vs2017-win2016 - -steps: - - powershell: | - & "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6.1 Tools/sn.exe" -Vr *,31bf3856ad364e35 - displayName: Bypass Strong Name validation - - task: NodeTool@0 - inputs: - versionSpec: 10.x - - powershell: | - & "npm" install autorest -g - displayName: Install autorest diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 67452aab2c97..6a2c0b9621f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -127,3 +127,41 @@ jobs: - script: echo $(NODE_OPTIONS) - script: "scripts/swagger-to-sdk.sh Azure/$(AZURE_SDK_REPO) -v $(AZURE_SDK_PARAMS)" displayName: "Swagger to SDK script" + +- job: "NetworkValidation" + condition: and(startsWith(variables['System.PullRequest.TargetBranch'], 'network-'), endsWith(variables['System.PullRequest.TargetBranch'], '-release')) + pool: + vmImage: vs2017-win2016 + variables: + NRP_SWAGGER_VALIDATION_OVERRIDE_PS_BRANCH: 'true' + NRP_BUILD_TOOLS_SKIP_GENERATE_PS1: 'true' + NRP_BUILD_TOOLS_OUTPUT_PATH: '$(System.DefaultWorkingDirectory)\Out' + steps: + - powershell: | + & "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6.1 Tools/sn.exe" -Vr *,31bf3856ad364e35 + displayName: Bypass Strong Name validation + - task: NodeTool@0 + inputs: + versionSpec: 10.x + displayName: Install Node.js + - script: npm install autorest -g + displayName: Install autorest + - script: git clone --depth 1 -- https://dev.azure.com/v-anevse/BuildScripts/_git/BuildScripts ..\BuildScripts + displayName: Clone build tools + - powershell: | + $swgrPath = (Get-Item ".\").FullName + $outputPath = $env:NRP_BUILD_TOOLS_OUTPUT_PATH + New-Item -Path $outputPath -ItemType "Directory" -Force | Out-Null + ..\BuildScripts\Test-SwaggerRelease.ps1 -Component Network -SwaggerRepoPath $swgrPath -OutputFolder $outputPath + failOnStderr: false + displayName: Test Swagger updates + - powershell: | + Copy-Item "..\BuildScripts\.azure-pipelines\.artifactignore" -Destination "$($env:NRP_BUILD_TOOLS_OUTPUT_PATH)\.artifactignore" -Force -ErrorAction "SilentlyContinue" + failOnStderr: false + condition: always() + displayName: Copy .artifactignore + - task: PublishPipelineArtifact@0 + condition: always() + inputs: + artifactName: SwaggerTestOutput + targetPath: $(NRP_BUILD_TOOLS_OUTPUT_PATH) From 5b105d97b73022140bf067359bed2c9d665e3e5d Mon Sep 17 00:00:00 2001 From: Anton Evseev Date: Tue, 16 Apr 2019 20:45:25 +0300 Subject: [PATCH 2/2] Add continueOnError to Network validation --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6a2c0b9621f3..54d0a77cf857 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -130,6 +130,7 @@ jobs: - job: "NetworkValidation" condition: and(startsWith(variables['System.PullRequest.TargetBranch'], 'network-'), endsWith(variables['System.PullRequest.TargetBranch'], '-release')) + continueOnError: true pool: vmImage: vs2017-win2016 variables: