From c5fed66467f50a74a5a99e2440e87f9b43f93939 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Fri, 20 Mar 2020 13:14:53 +1300 Subject: [PATCH] Improve README.MD Badges, Remove Gitter and Remove Daily Pipeline - Fixes #336 (#338) * Removed references to Gitter and cleaned up badges * Remove Daily Build YAML * Fix YAML * Change Build to use Variable Group * Prevent PR from running by default --- .github/ISSUE_TEMPLATE.md | 8 +- .github/PULL_REQUEST_TEMPLATE.md | 12 +- CHANGELOG.md | 7 + README.md | 15 +- azure-pipelines.daily.yml | 541 ------------------------------- azure-pipelines.yml | 6 +- 6 files changed, 31 insertions(+), 558 deletions(-) delete mode 100644 azure-pipelines.daily.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index dcf3a356..fd5a1849 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,12 @@ # Issue -Before submitting your issue for the CosmosDB project, please take a moment to provide the following details: +Before submitting your issue for the CosmosDB project, please take a moment to +provide the following details: - [ ] Version of PowerShell you're using - [ ] PowerShell host you're using (eg. Console Host, ISE, Visual Studio) - [ ] Operating system you're running - [ ] Version of CosmosDB PowerShell Module you're using (use `Get-Module -Name CosmosDB`) -If you have a general question or suggestion, feel free to post on the [CosmosDB PowerShell Module Gitter Chat at https://gitter.im/PlagueHO/CosmosDB](https://gitter.im/PlagueHO/CosmosDB). This is also a great place to just say Hi, ask any questions you might have or get help. - -Thanks for contributing your feedback and support! You can optionally submit a Pull Request against this project, if you have a fix you'd like to share. +Thanks for contributing your feedback and support! You can optionally submit a +Pull Request against this project, if you have a fix you'd like to share. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 46e6802a..2eb7a062 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,11 +2,13 @@ Thanks for submitting a Pull Request to the CosmosDB project! -Please make sure you have read the [Contributing.md](\.github\CONTRIBUTING.md) document. +Please make sure you have read the [Contributing.md](\.github\CONTRIBUTING.md) +document. ## Bug Fixes -Use the pound / hash sign to indicate which GitHub issues this Pull Request fixes, if applicable. +Use the pound / hash sign to indicate which GitHub issues this Pull Request +fixes, if applicable. - Fixes #1 - Fixes #2 @@ -14,10 +16,12 @@ Use the pound / hash sign to indicate which GitHub issues this Pull Request fixe ## Improvements / Enhancements -List out any code changes or enhancements you've made. This includes refactoring and removal of extraneous code. :) +List out any code changes or enhancements you've made. This includes refactoring +and removal of extraneous code. :) - Enhancement 1 - Enhancement 2 - Enhancement 3 -To improve visibility of this Pull Request, make sure to mention one of the project administrators, using `@githubusername` syntax. +To improve visibility of this Pull Request, make sure to mention one of the +project administrators, using `@githubusername` syntax. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3124da..4f75a449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.6.1] - 2020-03-19 +### Changed + +- Improved badge layout in README.MD and removed CodeCov.io badge - [Issue #336](https://github.com/PlagueHO/CosmosDB/issues/336). +- Removed references to Gitter and Gitter badge - [Issue #337](https://github.com/PlagueHO/CosmosDB/issues/337). +- Removed Azure Pipeline daily build YAML because the main + pipeline build YAML will be used instead. + ### Removed - Remove AppVeyor CI pipeline - fixes [Issue #329](https://github.com/PlagueHO/CosmosDB/issues/329). diff --git a/README.md b/README.md index d6fdd53d..432f0255 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,14 @@ [![Minimum Supported Windows PowerShell Version](https://img.shields.io/badge/WindowsPowerShell-5.1-blue.svg)](https://github.com/PlagueHO/CosmosDB) [![Minimum Supported PowerShell Core Version](https://img.shields.io/badge/PSCore-6.0-blue.svg)](https://github.com/PlagueHO/CosmosDB) [![Minimum Supported PowerShell Version](https://img.shields.io/badge/PS-7.0-blue.svg)](https://github.com/PlagueHO/CosmosDB) -[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dscottraynsford/GitHub/4/master)](https://dscottraynsford.visualstudio.com/GitHub/_test/analytics?definitionId=4&contextType=build) -[![Join the chat at https://gitter.im/PlagueHO/CosmosDB](https://badges.gitter.im/PlagueHO/CosmosDB.svg)](https://gitter.im/PlagueHO/CosmosDB?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1ee50b5eb15b47c188b3bdf7a5f8ee1d)](https://www.codacy.com/app/PlagueHO/CosmosDB?utm_source=github.com&utm_medium=referral&utm_content=PlagueHO/CosmosDB&utm_campaign=Badge_Grade) # CosmosDB PowerShell Module ## Module Build Status -| Branch | Azure Pipelines CI | Code Coverage | -| ------ | --------------------------------------- | -------------------------------------- | -| master | [![ap-image-master][]][ap-site-master] | [![cc-image-master][]][cc-site-master] | +| Branch | Azure Pipelines | Automated Tests | Code Quality | +| ------ | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| master | [![ap-image-master][]][ap-site-master] | [![ts-image-master][]][ts-site-master] | [![cq-image-master][]][cq-site-master] | ## Table of Contents @@ -1003,5 +1000,7 @@ For a list of changes to versions, see the [CHANGELOG.md](CHANGELOG.md) file. [ap-image-master]: https://dev.azure.com/dscottraynsford/GitHub/_apis/build/status/PlagueHO.CosmosDB?branchName=master [ap-site-master]: https://dev.azure.com/dscottraynsford/GitHub/_build/latest?definitionId=4 -[cc-image-master]: https://codecov.io/gh/PlagueHO/CosmosDB/branch/master/graph/badge.svg -[cc-site-master]: https://codecov.io/gh/PlagueHO/CosmosDB/branch/master +[ts-image-master]: https://img.shields.io/azure-devops/tests/dscottraynsford/GitHub/4/master +[ts-site-master]: https://dev.azure.com/dscottraynsford/GitHub/_build/latest?definitionId=4&branchName=master +[cq-image-master]: https://api.codacy.com/project/badge/Grade/1ee50b5eb15b47c188b3bdf7a5f8ee1d +[cq-site-master]: https://www.codacy.com/app/PlagueHO/CosmosDB?utm_source=github.com&utm_medium=referral&utm_content=PlagueHO/CosmosDB&utm_campaign=Badge_Grade diff --git a/azure-pipelines.daily.yml b/azure-pipelines.daily.yml deleted file mode 100644 index a05b2ea6..00000000 --- a/azure-pipelines.daily.yml +++ /dev/null @@ -1,541 +0,0 @@ -name: $(rev:r) -trigger: none -pr: none - -stages: - - stage: Build - jobs: - - job: Build_Module - displayName: 'Build Module' - pool: - vmImage: ubuntu-16.04 - steps: - - task: GitVersion@5 - name: gitversion - displayName: 'Evaluate Next Version' - inputs: - runtime: 'core' - configFilePath: 'GitVersion.yml' - - - task: PowerShell@2 - name: package - displayName: 'Build & Package Module' - inputs: - filePath: './build.ps1' - arguments: '-Tasks pack -ResolveDependency' - pwsh: true - env: - ModuleVersion: $(gitVersion.Informationalversion) - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Build Artifact' - inputs: - PathtoPublish: 'output/' - ArtifactName: 'output' - publishLocation: 'Container' - - - stage: Test - dependsOn: Build - jobs: - - job: Unit_Test_PS_Win2016 - displayName: 'Unit Test (Powershell 5.1 on Windows Server 2016)' - pool: - vmImage: vs2017-win2016 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (PowerShell 5.1 on Windows Server 2016)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PS_Win2016 - dependsOn: Unit_Test_PS_Win2016 - displayName: 'Integration Test (Powershell 5.1 on Windows Server 2016)' - pool: - vmImage: vs2017-win2016 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (PowerShell 5.1 on Windows Server 2016)' - condition: succeededOrFailed() - - - job: Unit_Test_PS_Win2019 - displayName: 'Unit Test (Powershell 5.1 on Windows Server 2019)' - pool: - vmImage: windows-2019 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (PowerShell 5.1 on Windows Server 2019)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PS_Win2019 - dependsOn: Unit_Test_PS_Win2019 - displayName: 'Integration Test (Powershell 5.1 on Windows Server 2019)' - pool: - vmImage: windows-2019 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (PowerShell 5.1 on Windows Server 2019)' - condition: succeededOrFailed() - - - job: Unit_Test_PSCore6_Ubuntu1604 - displayName: 'Unit Test (Powershell Core 6 on Ubuntu 16.04)' - pool: - vmImage: ubuntu-16.04 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - script: | - curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list - sudo apt-get update - sudo apt-get install -y --allow-downgrades powershell=6.2.3-1.ubuntu.16.04 - displayName: 'Install PowerShell Core 6' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (Powershell Core 6 on Ubuntu 16.04)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PSCore6_Ubuntu1604 - dependsOn: Unit_Test_PSCore6_Ubuntu1604 - displayName: 'Integration Test (Powershell Core 6 on Ubuntu 16.04)' - pool: - vmImage: ubuntu-16.04 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - script: | - curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list - sudo apt-get update - sudo apt-get install -y --allow-downgrades powershell=6.2.3-1.ubuntu.16.04 - displayName: 'Install PowerShell Core 6' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (Powershell Core 6 on Ubuntu 16.04)' - condition: succeededOrFailed() - - - job: Unit_Test_PS7_Ubuntu1604 - displayName: 'Unit Test (Powershell 7 on Ubuntu 16.04)' - pool: - vmImage: ubuntu-16.04 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (Powershell 7 on Ubuntu 16.04)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PS7_Ubuntu1604 - dependsOn: Unit_Test_PS7_Ubuntu1604 - displayName: 'Integration Test (Powershell 7 on Ubuntu 16.04)' - pool: - vmImage: ubuntu-16.04 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (Powershell 7 on Ubuntu 16.04)' - condition: succeededOrFailed() - - - job: Unit_Test_PS7_Ubuntu1804 - displayName: 'Unit Test (Powershell 7 on Ubuntu 18.04)' - pool: - vmImage: ubuntu-18.04 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (Powershell 7 on Ubuntu 18.04)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PS7_Ubuntu1804 - dependsOn: Unit_Test_PS7_Ubuntu1804 - displayName: 'Integration Test (Powershell 7 on Ubuntu 18.04)' - pool: - vmImage: ubuntu-18.04 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (Powershell 7 on Ubuntu 18.04)' - condition: succeededOrFailed() - - - job: Unit_Test_PSCore6_MacOS1014 - displayName: 'Unit Test (Powershell Core 6 on MacOS 10.14)' - pool: - vmImage: macos-10.14 - - steps: - - powershell: | - $repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/' - echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner" - echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName" - name: moduleBuildVariable - displayName: 'Set Environment Variables' - - - powershell: | - Uninstall-Module -Name Az -Force - displayName: 'Uninstall Az Module' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - task: PowerShell@2 - name: test - displayName: 'Run Unit Test' - inputs: - filePath: './build.ps1' - arguments: "-tasks test -PesterScript 'tests/Unit'" - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Unit (Powershell Core 6 on MacOS 10.14)' - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage' - condition: succeededOrFailed() - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'output/testResults/CodeCov*.xml' - pathToSources: '$(Build.SourcesDirectory)/output/$(moduleBuildVariable.RepositoryName)' - - - job: Integration_Test_PSCore6_MacOS1014 - dependsOn: Unit_Test_PSCore6_MacOS1014 - displayName: 'Integration Test (Powershell Core 6 on MacOS 10.14)' - pool: - vmImage: macos-10.14 - timeoutInMinutes: 0 - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' - - - powershell: | - Uninstall-Module -Name Az -Force - $null = Remove-Item -Path '~/.Azure' -Recurse -Force - displayName: 'Uninstall Az Module' - - - task: PowerShell@2 - name: test - displayName: 'Run Integration Test' - env: - azureApplicationId: $(azureApplicationId) - azureApplicationPassword: $(azureApplicationPassword) - azureSubscriptionId: $(azureSubscriptionId) - azureTenantId: $(azureTenantId) - inputs: - filePath: './build.ps1' - arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0" - pwsh: false - - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'output/testResults/NUnit*.xml' - testRunTitle: 'Integration (Powershell Core 6 on MacOS 10.14)' - condition: succeededOrFailed() diff --git a/azure-pipelines.yml b/azure-pipelines.yml index da6233e5..2aeee093 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,7 @@ trigger: - "v*" exclude: - "*-*" +pr: none stages: - stage: Build @@ -46,6 +47,8 @@ stages: - stage: Test dependsOn: Build + variables: + - group: CosmosDB.AzureSP jobs: - job: Unit_Test_PS_Win2016 displayName: 'Unit Test (Powershell 5.1 on Windows Server 2016)' @@ -560,7 +563,8 @@ stages: eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/') ), - eq(variables['System.TeamFoundationCollectionUri'], 'https://dscottraynsford.visualstudio.com/') + eq(variables['System.TeamFoundationCollectionUri'], 'https://dscottraynsford.visualstudio.com/'), + endsWith(variables['Build.DefinitionName'],'master') ) jobs: - job: Deploy_Module