Merge pull request #1765 from EraYaN/ci-add-submodule-update

Add submodule update to CI build.
This commit is contained in:
Joshua M. Boniface 2019-09-18 14:55:19 -04:00 committed by GitHub
commit 8ba86fe272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,21 @@ jobs:
- checkout: self
clean: true
submodules: true
persistCredentials: false
persistCredentials: true
- task: CmdLine@2
displayName: "Update submodules"
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: 'git submodule foreach --recursive git checkout $(Build.SourceBranch)'
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: "Update submodules (PR)"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest'))
inputs:
script: 'git submodule foreach --recursive git checkout $(System.PullRequest.TargetBranch)'
workingDirectory: '$(Build.SourcesDirectory)'
- task: DotNetCoreCLI@2
displayName: Publish
@ -161,7 +175,21 @@ jobs:
- checkout: self
clean: true
submodules: true
persistCredentials: false
persistCredentials: true
- task: CmdLine@2
displayName: "Update submodules"
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: 'git submodule foreach --recursive git checkout $(Build.SourceBranch)'
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: "Update submodules (PR)"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest'))
inputs:
script: 'git submodule foreach --recursive git checkout $(System.PullRequest.TargetBranch)'
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: Clone the UX repository