forked from rabwent11/storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
114 lines (96 loc) · 3.02 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
name: $(Date:yyyyMMdd)$(Rev:rr)
resources:
- repo: self
trigger:
batch: 'true'
branches:
include:
- master
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloud'
organization: 'cmdty'
scannerMode: 'MSBuild'
projectKey: 'storage'
projectName: 'storage'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
displayName: "Use Python 3.6"
- script: |
pip install virtualenv
pip install twine
pip install setuptools
pip install wheel
displayName: 'Install Python packages: virtualenv, twine, setuptools and wheel'
- script: dotnet tool restore --ignore-failed-sources
displayName: 'dotnet tool restore'
- task: PowerShell@2
displayName: 'Run Cake PowerShell Bootstrapper'
inputs:
filePath: 'build.ps1'
arguments: '-Verbosity Diagnostic -PrereleaseNumber=$(Build.BuildNumber)'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- task: SonarCloudAnalyze@1
- task: PublishTestResults@2
displayName: Publish Python test results
condition: succeededOrFailed()
inputs:
testResultsFiles: 'junit/test-results.xml'
mergeTestResults: true
testRunTitle: 'Python Unit Tests'
- task: PublishTestResults@2
displayName: 'Publish .NET test results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/*.trx'
mergeTestResults: true
testRunTitle: 'C# Unit Tests'
- task: PublishCodeCoverageResults@1
displayName: 'publish .NET coverage results'
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml'
- task: TwineAuthenticate@0
enabled: 'false'
inputs:
artifactFeeds: 'cmdty'
displayName: 'Twine Authenticate'
- script: 'twine upload -r cmdty --config-file $(PYPIRC_PATH) src/Cmdty.Storage.Python/dist/**'
enabled: 'false'
displayName: 'Upload Python package to Azure Artifacts Cmdty Feed'
- task: CopyFiles@2
displayName: Copy Python package to Artifact Staging Directory
inputs:
Contents: src/Cmdty.Storage.Python/dist/**
TargetFolder: $(Build.ArtifactStagingDirectory)
cleanTargetFolder: true
flattenFolders: true
- task: CopyFiles@2
displayName: Copy NuGet package to Artifact Staging Directory
inputs:
Contents: artifacts/**
TargetFolder: $(Build.ArtifactStagingDirectory)
flattenFolders: true
- task: DotNetCoreCLI@2
enabled: 'false'
displayName: Publish NuGet package to cmdty feed
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '18c506cf-ff39-47d5-8884-0ea703f25523'
- task: PublishBuildArtifacts@1
displayName: 'publish artifacts'
inputs:
ArtifactName: 'drop'