Skip to content

Commit f5a697b

Browse files
committed
Work CD-CI
- Add job to update dependents. - Move step to update dependents from regular build job to it's own job. ***NO_CI***
1 parent 6c237a5 commit f5a697b

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

azure-pipelines.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222

2323
# build MDP
2424
- job: Build_MDP
25+
condition: not( or( contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'), eq(variables['UPDATE_DEPENDENTS'], 'true') ) )
2526

2627
pool:
2728
vmImage: 'VS2017-Win2016'
@@ -110,24 +111,16 @@ jobs:
110111

111112
# push NuGet packages to Azure Artifacts feed (always happens except on PR builds)
112113
- task: NuGetCommand@2
114+
displayName: Push NuGet packages to Azure Artifacts
115+
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
116+
continueOnError: true
113117
inputs:
114118
command: push
115119
nuGetFeedType: external
116120
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
117121
publishFeedCredentials: 'AzureArtifacts'
118122
allowPackageConflicts: true
119-
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
120-
displayName: Push NuGet packages to Azure Artifacts
121123

122-
# update dependencies
123-
- task: PowerShell@2
124-
inputs:
125-
targetType: filePath
126-
filePath: azure-pipelines/update-dependencies.ps1
127-
env:
128-
MY_GITHUB_TOKEN: $(GitHubToken)
129-
condition: or( and( succeeded(), contains(variables['Build.SourceVersionMessage'], '***UPDATE_DEPENDENTS***') ), eq(variables['UPDATE_DEPENDENTS'], 'true') )
130-
displayName: Update dependent class libs
131124

132125
# create or update GitHub release
133126
- task: GitHubReleasePublish@1
@@ -141,13 +134,37 @@ jobs:
141134
githubTargetCommitsh: $(Build.SourceVersion)
142135
githubReleaseDraft: false
143136
githubReleasePrerelease: false
144-
githubReuseDraftOnly: true
137+
githubReuseDraftOnly: false
145138
githubReuseRelease: true
146139
githubEditRelease: true
147140
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.exe'
148141
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
149142
displayName: Create/Update GitHub release
150143

144+
##############################
145+
- job: Update_Dependents
146+
condition: or( contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'), eq(variables['UPDATE_DEPENDENTS'], 'true') )
147+
148+
dependsOn:
149+
- Build_MDP
150+
151+
pool:
152+
vmImage: 'VS2017-Win2016'
153+
154+
steps:
155+
# need this here in order to persist GitHub credentials
156+
- checkout: self
157+
fetchDepth: 1
158+
159+
# update dependencies
160+
- task: PowerShell@2
161+
displayName: Update dependent class libs
162+
inputs:
163+
targetType: filePath
164+
filePath: azure-pipelines/update-dependencies.ps1
165+
env:
166+
MY_GITHUB_TOKEN: $(GitHubToken)
167+
151168
##################################
152169
# report build failure to Discord
153170
- job: Report_Build_Failure

0 commit comments

Comments
 (0)