Skip to content

Commit 98d5c92

Browse files
committed
Work CD-CI
- Switch nb-versioning template. - Add tasks to generate change log. - Add task to report failure to Discord webhook. Signed-off-by: José Simões <jose.simoes@eclo.solutions>
1 parent 81399a0 commit 98d5c92

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

azure-pipelines.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ steps:
3636
feedsToUse: config
3737
nugetConfigPath: source/NuGet.config
3838

39-
- template: azure-pipelines-templates/nb-gitversioning.yml@templates
39+
- template: azure-pipelines-templates/nb-gitversioning-class-lib.yml@templates
4040

4141
- task: InstallnFBuildComponents@1
4242
displayName: Install nanoFramework MSBuild components
@@ -96,3 +96,33 @@ steps:
9696
publishFeedCredentials: 'NuGet'
9797
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.SourceBranchName'], 'tags') )
9898
displayName: Push NuGet packages to NuGet
99+
100+
- task: UseRubyVersion@0
101+
inputs:
102+
versionSpec: '>= 2.4'
103+
addToPath: true
104+
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
105+
displayName: Setup Ruby
106+
107+
# generate change log including future version
108+
- script: |
109+
gem install github_changelog_generator
110+
bundle exec github_changelog_generator --token $(GitHubToken) --future-release "v$(NBGV_Version)"
111+
condition: and( succeeded(), or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) )
112+
displayName: Generate change log
113+
114+
# generate change log including future version
115+
- script: |
116+
gem install github_changelog_generator
117+
bundle exec github_changelog_generator --token $(GitHubToken)
118+
condition: and( succeeded(), not( or( eq(variables['Build.SourceBranchName'], 'master'), contains(variables['Build.SourceBranchName'], 'release') ) ) )
119+
displayName: Generate change log
120+
121+
# step from template @ nf-tools repo
122+
- template: azure-pipelines-templates/discord-webhook.yml@templates
123+
parameters:
124+
status: 'failure'
125+
webhookUrl: '$(DiscordWebhook)'
126+
message: ''
127+
condition: failed()
128+
displayName: report build failure to Discord

0 commit comments

Comments
 (0)