Skip to content

Commit

Permalink
Merge pull request #55 from dsccommunity/dev
Browse files Browse the repository at this point in the history
Various updates
  • Loading branch information
ykuijs authored Apr 3, 2020
2 parents 684195d + 8e98f6a commit b77a39f
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 88 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Added

- OfficeOnlineServerDsc
- Implemented the new DSC Community CD/CI system
- Optin to the following Dsc Resource metatests:
- Common Tests - Validate Module Files
- Common Tests - Validate Script Files
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# OfficeOnlineServerDsc

[![Build Status](https://dev.azure.com/dsccommunity/OfficeOnlineServerDsc/_apis/build/status/dsccommunity.OfficeOnlineServerDsc?branchName=master)](https://dev.azure.com/dsccommunity/OfficeOnlineServerDsc/_build/latest?definitionId={definitionId}&branchName=master)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/OfficeOnlineServerDsc/{definitionId}/master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/OfficeOnlineServerDsc/{definitionId}/master)](https://dsccommunity.visualstudio.com/OfficeOnlineServerDsc/_test/analytics?definitionId={definitionId}&contextType=build)
[![Build Status](https://dev.azure.com/dsccommunity/OfficeOnlineServerDsc/_apis/build/status/dsccommunity.OfficeOnlineServerDsc?branchName=master)](https://dev.azure.com/dsccommunity/OfficeOnlineServerDsc/_build/latest?definitionId=29&branchName=master)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/OfficeOnlineServerDsc/29/master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/OfficeOnlineServerDsc/29/master)](https://dsccommunity.visualstudio.com/OfficeOnlineServerDsc/_test/analytics?definitionId=29&contextType=build)
[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/OfficeOnlineServerDsc?label=OfficeOnlineServerDsc%20Preview)](https://www.powershellgallery.com/packages/OfficeOnlineServerDsc/)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/OfficeOnlineServerDsc?label=OfficeOnlineServerDsc)](https://www.powershellgallery.com/packages/OfficeOnlineServerDsc/)

Expand Down
118 changes: 112 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ stages:
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'

- task: PowerShell@2
name: test
displayName: 'Run HQRM Test'
inputs:
filePath: './build.ps1'
arguments: '-Tasks hqrmtest'
pwsh: false

- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
Expand All @@ -74,8 +76,8 @@ stages:
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'HQRM'

- job: Test_Unit
displayName: 'Unit'
- job: Test_Unit_2013
displayName: 'Unit OWA 2013'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
Expand All @@ -87,33 +89,137 @@ stages:
echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName"
name: dscBuildVariable
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'
displayName: 'Run Unit Test for OWA 2013'
inputs:
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Unit'"
arguments: "-Tasks test -PesterScript @(@{ Path = '$(Build.SourcesDirectory)/Tests/Unit'; Parameters = @{WACCmdletModule = '$(Build.SourcesDirectory)/Tests/Unit/Stubs/15.0.4569.1506/OfficeWebApps.psm1' }})"
pwsh: false

- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit (Windows Server Core)'

- task: PublishBuildArtifacts@1
displayName: 'Publish CodeCoverage Artifact'
inputs:
pathToPublish: '$(Build.SourcesDirectory)/output/testResults'
artifactName: 'CodeCoverage_2013'
publishLocation: 'Container'

- job: Test_Unit_2016
displayName: 'Unit OOS 2016'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
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: dscBuildVariable
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 for OOS 2016'
inputs:
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript @(@{ Path = '$(Build.SourcesDirectory)/Tests/Unit'; Parameters = @{WACCmdletModule = '$(Build.SourcesDirectory)/Tests/Unit/Stubs/16.0.6814.2226/OfficeWebApps.psm1' }})"
pwsh: false

- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit (Windows Server Core)'

- task: PublishBuildArtifacts@1
displayName: 'Publish CodeCoverage Artifact'
inputs:
pathToPublish: '$(Build.SourcesDirectory)/output/testResults'
artifactName: 'CodeCoverage_2016'
publishLocation: 'Container'

- job: MergeCodeCoverage
dependsOn:
- 'Test_Unit_2013'
- 'Test_Unit_2016'
displayName: 'Merge Code Coverage'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
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: dscBuildVariable
displayName: 'Set Environment Variables'
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'

- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'CodeCoverage_2013'
downloadPath: '$(Build.SourcesDirectory)/output'

- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'CodeCoverage_2016'
downloadPath: '$(Build.SourcesDirectory)/output'

- task: PowerShell@2
name: merge
displayName: 'Merge Code Coverage files'
inputs:
filePath: './build.ps1'
arguments: "-Tasks merge"
pwsh: false

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
summaryFileLocation: 'output/CodeCov_Merged.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- stage: Deploy
Expand Down
8 changes: 4 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ BuildWorkflow:
test:
- Pester_Tests_Stop_On_Fail
- Pester_if_Code_Coverage_Under_Threshold
# Use this task when you have multiple parallel tests, which produce multiple
# code coverage files and needs to get merged into one file.
#- Merge_CodeCoverage_Files

merge:
- Merge_CodeCoverage_Files

publish:
- Publish_release_to_GitHub
Expand Down Expand Up @@ -88,7 +88,7 @@ Pester: #Passthru, OutputFile, CodeCoverageOutputFile not supported
- FunctionalQuality
- TestQuality
Tag:
CodeCoverageThreshold: 80 # Set to 0 to bypass
CodeCoverageThreshold: 79 # Set to 0 to bypass
# CodeCoverageOutputFile: JaCoCo_$OsShortName.xml
# CodeCoverageOutputFileEncoding: ascii
# CodeCoverageMergedOutputFile: JaCoCo_Merged.xml
Expand Down
Loading

0 comments on commit b77a39f

Please sign in to comment.