From 658c1f317bfff0cff12ce7d206a78c0a302807ee Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Thu, 12 Sep 2024 15:45:41 -0700 Subject: [PATCH] Don't warn on folders that aren't actually packages (#5974) --- eng/pipelines/templates/jobs/live.tests.yml | 1 + .../stages/archetype-cpp-release.yml | 1 + .../templates/stages/archetype-sdk-client.yml | 3 +++ eng/pipelines/templates/variables/globals.yml | 24 +++---------------- eng/scripts/Get-PkgVersion.ps1 | 2 +- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index 2a2d73963..98b367702 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -75,6 +75,7 @@ jobs: matrix: $[ ${{ parameters.Matrix }} ] variables: + - template: /eng/pipelines/templates/variables/globals.yml@self - template: /eng/pipelines/templates/variables/image.yml@self - name: CMOCKA_XML_FILE value: "%g-test-results.xml" diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 4b82c7371..0840f38ac 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -265,6 +265,7 @@ stages: ) ) variables: + - template: /eng/pipelines/templates/variables/globals.yml - template: /eng/pipelines/templates/variables/image.yml jobs: diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 0b193ebf9..50f3050a7 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -137,6 +137,7 @@ extends: stages: - stage: CMakeGeneration variables: + - template: /eng/pipelines/templates/variables/globals.yml@self - template: /eng/pipelines/templates/variables/image.yml@self jobs: - template: /eng/pipelines/templates/jobs/cmake-generate-jobs.yml@self @@ -152,6 +153,7 @@ extends: # Integration can launch immediately without awaiting more build and test jobs - stage: PrePublishBuild variables: + - template: /eng/pipelines/templates/variables/globals.yml@self - template: /eng/pipelines/templates/variables/image.yml@self dependsOn: [] jobs: @@ -176,6 +178,7 @@ extends: - stage: Build variables: + - template: /eng/pipelines/templates/variables/globals.yml@self - template: /eng/pipelines/templates/variables/image.yml@self dependsOn: [] jobs: diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 1381498ce..9630d6afb 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -2,24 +2,6 @@ variables: # True if 'Enable system diagnostics' is checked when running a pipeline manually IsDebug: $[coalesce(variables['System.Debug'], 'false')] - AdditionalOptions: '' - - # Exists if needed in coalesce situations. - DefaultTestGoals: 'surefire:test' - # This will be overwritten by the test matrix, if configured. - TestGoals: $(DefaultTestGoals) - - # This will be overwritten by the test matrix, if configured. - TestOptions: '' - # TestFromSource is one of the cache keys but isn't set until the test matrix - # has been processed. Without a default value it'll be treated as a string literal - # "$(TestFromSource)" instead of true/false. It'll be overwritten when the test - # matrix has been processed - TestFromSource: false - - skipComponentGovernanceDetection: true - DisableDockerDetector: true - Package.EnableSBOMSigning: true - - # Disable CodeQL injections except for where we specifically enable it - Codeql.SkipTaskAutoInjection: true + ${{ if and(eq(variables['Build.Reason'],'PullRequest'), eq(variables['System.PullRequest.IsFork'], 'True')) }}: + # Disable warning for tools that are disabled for forked builds + GDN_SUPPRESS_FORKED_BUILD_WARNING: true diff --git a/eng/scripts/Get-PkgVersion.ps1 b/eng/scripts/Get-PkgVersion.ps1 index 10be95d86..243f8f1b2 100644 --- a/eng/scripts/Get-PkgVersion.ps1 +++ b/eng/scripts/Get-PkgVersion.ps1 @@ -13,7 +13,7 @@ $versionFileLocation = Get-VersionHppLocation ` -PackageName $PackageName if (!$versionFileLocation) { - LogWarning "Failed to retrieve package version for '$ServiceDirectory/$PackageName'. No version file found." + Write-Verbose "Didn't find a version file for '$ServiceDirectory/$PackageName', so assuming it is not a package." return $null }