diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 49ea0fdb978b..9cf3966b11af 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -98,6 +98,8 @@ stages: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 steps: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 diff --git a/.azure/pipelines/ci-unofficial.yml b/.azure/pipelines/ci-unofficial.yml index 28dbc0f13365..930b42f63ab3 100644 --- a/.azure/pipelines/ci-unofficial.yml +++ b/.azure/pipelines/ci-unofficial.yml @@ -111,6 +111,8 @@ extends: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 beforeBuild: - script: git submodule update --init displayName: Update submodules diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 0705018c8cb9..f0bb0cbf7aff 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -138,6 +138,8 @@ extends: jobName: Code_check jobDisplayName: Code check agentOs: Windows + # Need full history for git log comparison in CodeCheck.ps1 + fetchDepth: 0 steps: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index e27cd657128c..a2e24e0560eb 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -71,6 +71,9 @@ parameters: timeoutInMinutes: 180 testRunTitle: $(AgentOsName)-$(BuildConfiguration) useHostedUbuntu: true + # Checkout optimization parameters + fetchDepth: 1 + fetchTags: false # We need longer than the default amount of 5 minutes to upload our logs/artifacts. (We currently take around 5 mins in the best case). # This makes sure we have time to upload everything in the case of a build timeout - really important for investigating a build @@ -159,6 +162,9 @@ jobs: - name: ${{ pair.key }} value: ${{ pair.value }} steps: + - checkout: self + fetchDepth: ${{ parameters.fetchDepth }} + fetchTags: ${{ parameters.fetchTags }} - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: df -h displayName: Disk size @@ -385,6 +391,9 @@ jobs: - name: ${{ pair.key }} value: ${{ pair.value }} steps: + - checkout: self + fetchDepth: ${{ parameters.fetchDepth }} + fetchTags: ${{ parameters.fetchTags }} - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: df -h displayName: Disk size