Skip to content

Commit

Permalink
Use sparse checkout in Compliance job (#35821)
Browse files Browse the repository at this point in the history
Use sparse checkout in Compliance job
  • Loading branch information
alzimmermsft authored Jul 11, 2023
1 parent c2a7d25 commit fa12efa
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

steps:
# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the github service connection to be loaded.
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
-ProjectList $(ProjectList)
# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the github service connection to be loaded.
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
versionSpec: $(PythonVersion)

# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the github service connection to be loaded.
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Expand Down Expand Up @@ -269,7 +269,7 @@ jobs:
-ProjectList $(ProjectList)
# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the github service connection to be loaded.
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Expand Down Expand Up @@ -410,7 +410,43 @@ jobs:
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022

steps:
# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Paths:
- '**/*.xml'
- '**/*.md'
- '!sdk/**/test-recordings'
- '!sdk/**/session-records'

- template: /eng/pipelines/templates/steps/generate-project-list-and-cache-maven-repository.yml
parameters:
Artifacts: ${{ parameters.Artifacts }}
AdditionalModules: ${{ parameters.AdditionalModules }}
JobType: 'Compliance'
UseCache: false

- task: PowerShell@2
displayName: Generate directories variable for sparse checkout
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Generate-ServiceDirectories-From-Project-List.ps1
arguments: >
-SourcesDirectory $(Build.SourcesDirectory)
-ProjectList $(ProjectList)
# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
Paths: $(SparseCheckoutDirectories)
SkipCheckoutNone: true

- template: /eng/common/pipelines/templates/steps/credscan.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Expand Down

0 comments on commit fa12efa

Please sign in to comment.