-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
115 lines (109 loc) · 3.81 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
# You can also tell Azure Pipelines to skip running a pipeline that a commit would normally trigger. Just include [skip ci] in the commit message or description of the HEAD commit and Azure Pipelines will skip running CI. You can also use any of the variations below.
#[skip ci] or [ci skip]
#skip-checks: true or skip-checks:true
#[skip azurepipelines] or [azurepipelines skip]
#[skip azpipelines] or [azpipelines skip]
#[skip azp] or [azp skip]
#***NO_CI***
# name: $(TeamProject)_$(BuildDefinitionName)_$(SourceBranchName)_$(Build.DefinitionVersion)_$(Build.BuildId)_$(Build.BuildNumber)_$(Date:yyyyMMdd)$(Rev:.r)
trigger:
batch: true
branches:
include:
- master
paths:
include:
- src/Ruya.Primitives
exclude:
- README.md
pool:
vmImage: 'ubuntu-16.04'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
buildNumber: '$(MajorVersion).$(MinorVersion).$(Build.BuildId)'
steps:
- pwsh: |
Write-Host "##vso[build.updatebuildnumber]$(buildNumber)"
displayName: update the "Build Number"
- script: |
git config --global --add filter.lfs.required true
git config --global --add filter.lfs.smudge "git-lfs smudge -- %f"
git config --global --add filter.lfs.process "git-lfs filter-process"
git config --global --add filter.lfs.clean "git-lfs clean -- %f"
displayName: Configure LFS for use with submodules
- checkout: self
lfs: true
submodules: true
- task: UseDotNet@2
displayName: dotnet sdk
inputs:
packageType: 'sdk'
version: '3.0.100'
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: 'restore'
projects: '**/Ruya.Primitives.csproj'
# feedsToUse: config
# nugetConfigPath: NuGet.config # Relative to root of the repository
# externalFeedCredentials: <Name of the NuGet service connection>
- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
command: 'build'
projects: '**/Ruya.Primitives.csproj'
arguments: '--configuration $(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber)'
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: 'test'
projects: '**/*Tests/Ruya.Primitives.Tests.csproj'
arguments: '--configuration $(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber)'
- pwsh: |
Write-Host "##vso[build.addbuildtag]$(buildNumber)"
- task: DotNetCoreCLI@2
displayName: dotnet publish
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/Ruya.Helpers.Primitives.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: false
modifyOutputPath: true
- task: DotNetCoreCLI@2
displayName: dotnet pack
inputs:
command: 'pack'
packagesToPack: '**/Ruya.Primitives.csproj'
nobuild: true
includesymbols: false
includesource: false
versioningScheme: 'byBuildNumber'
- task: DotNetCoreCLI@2
displayName: dotnet push
continueOnError: true
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'
- task: PublishBuildArtifacts@1
displayName: Publish Artifact
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
# - task: GitHubRelease@1
# inputs:
# repositoryName: '$(Build.Repository.Name)'
# action: 'create'
# target: '$(Build.SourceVersion)'
# tagSource: 'gitTag'
# changeLogCompareToRelease: 'lastFullRelease'
# changeLogType: 'commitBased'