Skip to content

Commit 040b65b

Browse files
authored
Latest CI yml changes (#4)
* Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines Only pack solution when on master branch. Publish test results. * Update azure-pipelines.yml for Azure Pipelines Removing publish tests task, because it is build in to the DotNetCoreCLI task. * Update azure-pipelines.yml for Azure Pipelines Let's see if we now get all files that we need for publishing this to NuGet. * Update azure-pipelines.yml for Azure Pipelines Testing to modify build output path. * Update azure-pipelines.yml for Azure Pipelines Testing to modify build base output path. * Update azure-pipelines.yml for Azure Pipelines Testing to modify build output path. * Update azure-pipelines.yml for Azure Pipelines Still having problems with the artifact publishing. * Update azure-pipelines.yml for Azure Pipelines Let's test the ArtifactStagingDirectory. * Update azure-pipelines.yml for Azure Pipelines Let's test the NuGet Command task. * Update azure-pipelines.yml for Azure Pipelines Now it should work. * Update azure-pipelines.yml for Azure Pipelines Now it should work #2. * Update azure-pipelines.yml for Azure Pipelines Everything is working now.
1 parent cec7803 commit 040b65b

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

azure-pipelines.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# ASP.NET
2-
# Build and test ASP.NET projects.
3-
# Add steps that publish symbols, save build artifacts, deploy, and more:
4-
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
5-
61
trigger:
72
- dev
83
- master
@@ -15,26 +10,33 @@ pool:
1510
vmImage: 'windows-latest'
1611

1712
variables:
18-
solution: '**/GdprInfo.sln'
19-
buildPlatform: 'Any CPU'
20-
buildConfiguration: 'Release'
21-
nugetPackOutputDir: '$(Build.ArtifactStagingDirectory)/nuget'
13+
- group: 'Package Versioning'
14+
- name: buildPlatform
15+
value: 'Any CPU'
16+
- name: buildConfiguration
17+
value: 'Release'
18+
- name: buildDirPath
19+
value: '$(Build.SourcesDirectory)/src/bin/$(buildPlatform)/$(buildConfiguration)'
2220

2321

2422

2523
steps:
26-
- task: NuGetToolInstaller@1
27-
28-
- task: NuGetCommand@2
24+
- task: MSBuild@1
25+
displayName: Build Solution
2926
inputs:
30-
restoreSolution: '$(solution)'
27+
solution: '**/src/GdprInfo.csproj'
28+
configuration: $(buildConfiguration)
29+
platform: $(buildPlatform)
30+
msbuildArguments: '/restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false'
3131

32-
- task: VSBuild@1
33-
displayName: Build Solution
32+
- task: MSBuild@1
33+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
34+
displayName: Pack NuGets
3435
inputs:
35-
solution: '$(solution)'
36-
platform: '$(buildPlatform)'
37-
configuration: '$(buildConfiguration)'
36+
solution: '**/src/GdprInfo.csproj'
37+
configuration: $(buildConfiguration)
38+
platform: $(buildPlatform)
39+
msbuildArguments: '/t:Pack /p:PackageVersion=$(major).$(minor).$(patch) /p:PackageOutputPath="$(buildDirPath)"'
3840

3941
- task: DotNetCoreCLI@2
4042
displayName: Run Tests
@@ -45,17 +47,9 @@ steps:
4547
testRunTitle: 'Shared Layer Tests'
4648
workingDirectory: '$(System.DefaultWorkingDirectory)'
4749

48-
- task: MSBuild@1
49-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
50-
displayName: Pack NuGets
51-
inputs:
52-
solution: '**/src/GdprInfo.csproj'
53-
configuration: $(buildConfiguration)
54-
msbuildArguments: '/t:Pack /p:PackageVersion=$(major).$(minor).$(patch) /p:PackageOutputPath="$(nugetPackOutputDir)"'
55-
5650
- task: PublishBuildArtifacts@1
5751
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
5852
inputs:
59-
PathtoPublish: '$(nugetPackOutputDir)'
53+
PathtoPublish: '$(buildDirPath)'
6054
ArtifactName: 'nuget'
6155
publishLocation: 'Container'

0 commit comments

Comments
 (0)