From 9ae8cb4c26879f6c252306f33e36f3ed607bdfdc Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Fri, 20 Sep 2024 12:06:17 -0700 Subject: [PATCH] Fix sparse-checkout commit (#9022) --- eng/common/pipelines/templates/jobs/prepare-pipelines.yml | 4 ++++ eng/pipelines/pipeline-generation-single.yml | 7 ++++--- eng/pipelines/pipeline-generation.yml | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/eng/common/pipelines/templates/jobs/prepare-pipelines.yml b/eng/common/pipelines/templates/jobs/prepare-pipelines.yml index 2387c962456..d432c215f3d 100644 --- a/eng/common/pipelines/templates/jobs/prepare-pipelines.yml +++ b/eng/common/pipelines/templates/jobs/prepare-pipelines.yml @@ -5,6 +5,9 @@ parameters: - name: RepositoryPath type: string default: 'sdk' + - name: RepositoryCommitish + type: string + default: $(Build.SourceVersion) jobs: - job: @@ -36,6 +39,7 @@ jobs: parameters: Repositories: - Name: ${{ parameters.Repository }} + Commitish: ${{ parameters.RepositoryCommitish }} WorkingDirectory: $(System.DefaultWorkingDirectory) Paths: - 'sdk/**/*.yml' diff --git a/eng/pipelines/pipeline-generation-single.yml b/eng/pipelines/pipeline-generation-single.yml index 880353e36a9..9ac0974502b 100644 --- a/eng/pipelines/pipeline-generation-single.yml +++ b/eng/pipelines/pipeline-generation-single.yml @@ -2,15 +2,15 @@ pr: none trigger: none parameters: -- name: Branch - type: string - default: main - name: RepositoryName type: string default: azure-sdk-for- - name: RepositoryPath type: string default: 'sdk/' +- name: RepositoryCommitish + type: string + default: main variables: - template: /eng/pipelines/templates/variables/image.yml @@ -24,3 +24,4 @@ jobs: parameters: Repository: Azure/${{ parameters.RepositoryName }} RepositoryPath: ${{ parameters.RepositoryPath }} + RepositoryCommitish: ${{ parameters.RepositoryCommitish }} diff --git a/eng/pipelines/pipeline-generation.yml b/eng/pipelines/pipeline-generation.yml index 56ceec2fb25..889c2297c0d 100644 --- a/eng/pipelines/pipeline-generation.yml +++ b/eng/pipelines/pipeline-generation.yml @@ -29,3 +29,4 @@ jobs: - template: /eng/common/pipelines/templates/jobs/prepare-pipelines.yml parameters: Repository: ${{ repo }} + RepositoryCommitish: main