diff --git a/.azure-pipelines/.prettierrc.yml b/.azure-pipelines/.prettierrc.yml new file mode 100644 index 0000000000000..01769692264f1 --- /dev/null +++ b/.azure-pipelines/.prettierrc.yml @@ -0,0 +1 @@ +singleQuote: true diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml index b6e802f30a81e..4023b841b199e 100644 --- a/.azure-pipelines/client.yml +++ b/.azure-pipelines/client.yml @@ -3,115 +3,115 @@ # AzConfigConnectionString - The connection string used for testing the AzConfig service. This is set in the pipeline web ui as it needs different values for public vs internal. trigger: -- master + - master variables: DotNetCoreVersion: '2.1.503' jobs: -- job: 'Build' - - pool: - vmImage: 'vs2017-win2016' - - steps: - - task: DotNetCoreInstaller@0 - displayName: 'Use .NET Core sdk $(DotNetCoreVersion)' - inputs: - version: '$(DotNetCoreVersion)' - - - task: DotNetCoreCLI@2 - displayName: 'Build and Package' - inputs: - command: pack - packagesToPack: '$(ProjectFile)' - env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_MULTILEVEL_LOOKUP: 0 - - - task: PublishBuildArtifacts@1 - condition: succeededOrFailed() - displayName: 'Publish Artifacts' - inputs: - ArtifactName: packages - -- job: 'Analyze' - - dependsOn: - 'Build' - - pool: - vmImage: 'vs2017-win2016' - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifacts' - condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest')) - inputs: - artifactName: packages - downloadPath: $(System.DefaultWorkingDirectory) - - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' - # ComponentGovernance is currently unable to run on pull requests of public projects. Running on - # scheduled builds should be good enough. - condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest')) - -- job: 'Test' - - strategy: - matrix: - Linux: - OSName: 'Linux' - OSVmImage: 'ubuntu-16.04' - Windows: - OSName: 'Windows' - OSVmImage: 'vs2017-win2016' - MacOs: - OSName: 'MacOS' - OSVmImage: 'macOS-10.13' - - pool: - vmImage: '$(OSVmImage)' - - steps: - - task: DotNetCoreInstaller@0 - displayName: 'Use .NET Core sdk $(DotNetCoreVersion)' - inputs: - version: '$(DotNetCoreVersion)' - - - task: DotNetCoreCLI@2 - displayName: 'Build & Test (no live tests)' - condition: eq(variables['System.TeamProject'], 'public') - env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_MULTILEVEL_LOOKUP: 0 - inputs: - command: test - projects: '$(ProjectFile)' - arguments: --filter TestCategory!=Live --logger trx - publishTestResults: false - - - task: DotNetCoreCLI@2 - displayName: 'Build & Test (with live tests)' - condition: ne(variables['System.TeamProject'], 'public') - env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_MULTILEVEL_LOOKUP: 0 - AZ_CONFIG_CONNECTION: $(AzConfigConnectionString) - inputs: - command: test - projects: '$(ProjectFile)' - arguments: --logger trx - publishTestResults: false - - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testResultsFiles: '**/*.trx' - testRunTitle: '$(OSName) DotNet $(DotNetCoreVersion)' - testResultsFormat: 'VSTest' - mergeTestResults: true + - job: 'Build' + + pool: + vmImage: 'vs2017-win2016' + + steps: + - task: DotNetCoreInstaller@0 + displayName: 'Use .NET Core sdk $(DotNetCoreVersion)' + inputs: + version: '$(DotNetCoreVersion)' + + - task: DotNetCoreCLI@2 + displayName: 'Build and Package' + inputs: + command: pack + packagesToPack: '$(ProjectFile)' + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + + - task: PublishBuildArtifacts@1 + condition: succeededOrFailed() + displayName: 'Publish Artifacts' + inputs: + ArtifactName: packages + + - job: 'Analyze' + + dependsOn: + - 'Build' + + pool: + vmImage: 'vs2017-win2016' + + steps: + - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifacts' + condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest')) + inputs: + artifactName: packages + downloadPath: $(System.DefaultWorkingDirectory) + + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + # ComponentGovernance is currently unable to run on pull requests of public projects. Running on + # scheduled builds should be good enough. + condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest')) + + - job: 'Test' + + strategy: + matrix: + Linux: + OSName: 'Linux' + OSVmImage: 'ubuntu-16.04' + Windows: + OSName: 'Windows' + OSVmImage: 'vs2017-win2016' + MacOs: + OSName: 'MacOS' + OSVmImage: 'macOS-10.13' + + pool: + vmImage: '$(OSVmImage)' + + steps: + - task: DotNetCoreInstaller@0 + displayName: 'Use .NET Core sdk $(DotNetCoreVersion)' + inputs: + version: '$(DotNetCoreVersion)' + + - task: DotNetCoreCLI@2 + displayName: 'Build & Test (no live tests)' + condition: eq(variables['System.TeamProject'], 'public') + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + inputs: + command: test + projects: '$(ProjectFile)' + arguments: --filter TestCategory!=Live --logger trx + publishTestResults: false + + - task: DotNetCoreCLI@2 + displayName: 'Build & Test (with live tests)' + condition: ne(variables['System.TeamProject'], 'public') + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + AZ_CONFIG_CONNECTION: $(AzConfigConnectionString) + inputs: + command: test + projects: '$(ProjectFile)' + arguments: --logger trx + publishTestResults: false + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/*.trx' + testRunTitle: '$(OSName) DotNet $(DotNetCoreVersion)' + testResultsFormat: 'VSTest' + mergeTestResults: true