Skip to content

Commit

Permalink
Updated azure-pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFidge committed Sep 23, 2019
1 parent 7dfca52 commit a7aaa98
Showing 1 changed file with 18 additions and 112 deletions.
130 changes: 18 additions & 112 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,115 +22,21 @@ pr:
exclude:
- '*.md'

jobs:
- job: compile_test_pack_push
displayName: 'Compile, test, pack and push'
pool:
vmImage: 'windows-2019'

variables:
BuildConfiguration: 'Release'
Dotnet.Skip.First.Time.Experience: 'True'

steps:

# Restore NuGet
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet packages'
inputs:
command: 'restore'
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
verbosityRestore: 'normal'

# GitVersion
- task: GitVersion@4
inputs:
updateAssemblyInfo: true
additionalArguments: ' /ensureassemblyinfo'
preferBundledVersion: true

# Build
- task: DotNetCoreCLI@2
displayName: 'Build Solution'
inputs:
command: 'build'
env:
GenerateAssemblyInfo: 'false'

# Unit Test
- task: DotNetCoreCLI@2
displayName: 'Run Unit tests'
inputs:
command: 'test'
projects: 'test/unit/**/*.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) /p:CollectCoverage=true /p:Exclude="[xunit.*]*%2c[*.Test]*" --filter Unit'

# Integration Test
- task: DotNetCoreCLI@2
displayName: 'Run Integration tests'
inputs:
command: 'test'
projects: 'test/integration/**/*.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) /p:CollectCoverage=true /p:Exclude="[xunit.*]*%2c[*.Test]*" --filter Integration'

# Acceptance Test
- task: PowerShell@2
displayName: 'Run Acceptance tests'
inputs:
filePath: 'azure-pipelines.ps1'
pwsh: true

- task: PublishTestResults@2
displayName: 'Publish Acceptance test results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/TEST-*.xml'
failTaskOnFailedTests: true

# Dev. Note: Restore task in repositories using this GitHub template
# # Pack
# - task: DotNetCoreCLI@2
# displayName: 'Create NuGet packages'
# inputs:
# command: 'pack'
# packagesToPack: '**/*.csproj'
# packDirectory: '$(Build.ArtifactStagingDirectory)'
# versioningScheme: 'byEnvVar'
# versionEnvVar: GITVERSION_NUGETVERSIONV2
# includeSymbols: true
# nobuild: true
# env:
# GenerateAssemblyInfo: 'false'

# Dev. Note: Restore task in repositories using this GitHub template # Dev. Note: Restore task in repositories using this GitHub template
# # Publish Artifacts
# - task: PublishPipelineArtifact@0
# displayName: 'Create Pipeline Artifact'
# inputs:
# artifactName: 'Nuget'
# targetPath: $(Build.ArtifactStagingDirectory)

# Dev. Note: Restore task in repositories using this GitHub template
# # Push NuGet packages to Develop
# - task: NuGetCommand@2
# displayName: 'Push to develop feed'
# condition: and ( succeeded(), in(variables['Build.SourceBranch'], 'refs/heads/develop'))
# inputs:
# command: 'push'
# packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
# allowPackageConflicts: true
# publishVstsFeed: 'develop'
# includeSymbols: true

# Dev. Note: Restore task in repositories using this GitHub template
# Push NuGet packages to Release
# - task: NuGetCommand@2
# displayName: 'Push to release feed'
# condition: and ( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: 'push'
# packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
# allowPackageConflicts: true
# publishVstsFeed: 'release'
# includeSymbols: false
resources:
repositories:
- repository: templates
type: github
name: CluedIn-io/AzurePipelines.Templates
endpoint: 'CluedIn-io'

pool:
vmImage: 'VS2017-Win2016'

variables:
Dotnet.Skip.First.Time.Experience: 'True'
testFolderPath: '$(Build.SourcesDirectory)/test'

steps:
- template: crawler.default.build.yml@templates

- template: documentation.publish.yml@templates

0 comments on commit a7aaa98

Please sign in to comment.