@@ -35,30 +35,94 @@ resources:
3535 name : nanoframework/nf-tools
3636 endpoint : nanoframework
3737
38- pool :
39- vmImage : ' windows-latest'
40-
41- variables :
42- DOTNET_NOLOGO : true
43- solution : ' nanoFramework.System.IO.Streams.sln'
44- buildPlatform : ' Any CPU'
45- buildConfiguration : ' Release'
46- nugetPackageName : ' nanoFramework.System.IO.Streams'
47-
48- steps :
49-
50- # step from template @ nf-tools repo
51- # all build, update and publish steps
52- - template : azure-pipelines-templates/class-lib-build.yml@templates
53- parameters :
54- sonarCloudProject : ' nanoframework_System.IO.Streams'
55- runUnitTests : true
56- unitTestRunsettings : ' $(System.DefaultWorkingDirectory)\UnitTests\MemoryStreamUnitTests\nano.runsettings'
57-
58- # step from template @ nf-tools repo
59- # report error
60- - template : azure-pipelines-templates/discord-webhook-task.yml@templates
61- parameters :
62- status : ' failure'
63- webhookUrl : ' $(DiscordWebhook)'
64- message : ' '
38+ jobs :
39+
40+ # #############################
41+ - job : Build_Library
42+ condition : >-
43+ or(
44+ eq(variables['UPDATE_DEPENDENTS'], 'false'),
45+ eq(variables['StartReleaseCandidate'], 'true')
46+ )
47+ pool :
48+ vmImage : ' windows-latest'
49+
50+ variables :
51+ DOTNET_NOLOGO : true
52+ solution : ' nanoFramework.System.IO.Streams.sln'
53+ buildPlatform : ' Any CPU'
54+ buildConfiguration : ' Release'
55+ nugetPackageName : ' nanoFramework.System.IO.Streams'
56+
57+ steps :
58+
59+ # step from template @ nf-tools repo
60+ # all build, update and publish steps
61+ - template : azure-pipelines-templates/class-lib-build.yml@templates
62+ parameters :
63+ sonarCloudProject : ' nanoframework_System.IO.Streams'
64+ runUnitTests : true
65+ unitTestRunsettings : ' $(System.DefaultWorkingDirectory)\UnitTests\MemoryStreamUnitTests\nano.runsettings'
66+
67+ # #############################
68+ - job : Update_Dependencies
69+ condition : >-
70+ or(
71+ and(
72+ succeeded(),
73+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
74+ eq(variables['StartReleaseCandidate'], 'false')
75+ ),
76+ and(
77+ succeeded(),
78+ contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'),
79+ eq(variables['StartReleaseCandidate'], 'false')
80+ ),
81+ eq(variables['UPDATE_DEPENDENTS'], 'true')
82+ )
83+
84+ dependsOn :
85+ - Build_Library
86+
87+ pool :
88+ vmImage : ' windows-latest'
89+
90+ variables :
91+ DOTNET_NOLOGO : true
92+
93+ steps :
94+
95+ - checkout : none
96+
97+ # update dependents
98+ - template : azure-pipelines-templates/update-dependents.yml@templates
99+ parameters :
100+ repositoriesToUpdate : |
101+ System.Net
102+ System.IO.Ports
103+ nanoFramework.Logging
104+ nanoFramework.Json
105+
106+ # #################################
107+ # report build failure to Discord
108+ - job : Report_Build_Failure
109+ condition : or( failed('Build_Library'), failed('Update_Dependencies'))
110+
111+ dependsOn :
112+ - Build_Library
113+ - Update_Dependencies
114+
115+ pool :
116+ vmImage : ' windows-latest'
117+
118+ steps :
119+
120+ - checkout : self
121+
122+ # step from template @ nf-tools repo
123+ # report error
124+ - template : azure-pipelines-templates/discord-webhook-task.yml@templates
125+ parameters :
126+ status : ' failure'
127+ webhookUrl : ' $(DiscordWebhook)'
128+ message : ' '
0 commit comments