Skip to content

Commit

Permalink
Set Build_Repository_Title (#22237)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcumming authored Feb 25, 2025
1 parent 30cce24 commit 253887e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
10 changes: 5 additions & 5 deletions tools/devops/automation/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,21 @@ extends:
os: windows
sdl:
baseline:
baselineFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/baselines.gdnbaselines'
baselineFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/baselines.gdnbaselines'
suppression:
suppressionFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/suppress.gdnsuppress'
suppressionFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/suppress.gdnsuppress'
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
tsa:
configFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/tsa_config.gdntsa'
configFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/tsa_config.gdntsa'
sbom:
enabled: false # we run our on sbom generation
credscan:
suppressionsFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/CredScanSuppressions.json'
suppressionsFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/CredScanSuppressions.json'
policheck:
exclusionsFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/PoliCheckExclusions.xml'
exclusionsFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/PoliCheckExclusions.xml'
sourceRepositoriesToScan:
runInSingleJob: true # run both maccore and macios in the same job
include:
Expand Down
10 changes: 5 additions & 5 deletions tools/devops/automation/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,23 @@ extends:
os: windows
sdl:
baseline:
baselineFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/baselines.gdnbaselines'
baselineFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/baselines.gdnbaselines'
suppression:
suppressionFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/suppress.gdnsuppress'
suppressionFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/suppress.gdnsuppress'
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
tsa:
configFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/tsa_config.gdntsa'
configFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/tsa_config.gdntsa'
sbom:
enabled: false # we run our on sbom generation
credscan:
suppressionsFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/CredScanSuppressions.json'
suppressionsFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/CredScanSuppressions.json'
debugMode: true
verboseOutput: true
policheck:
exclusionsFile: '$(System.DefaultWorkingDirectory)/macios/tools/devops/governance/PoliCheckExclusions.xml'
exclusionsFile: '$(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/governance/PoliCheckExclusions.xml'
sourceRepositoriesToScan:
runInSingleJob: true # run both maccore and macios in the same job
include:
Expand Down
6 changes: 0 additions & 6 deletions tools/devops/automation/templates/common/checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ parameters:
default: HEAD

steps:
- pwsh: |
gci env:
$env:BUILD_REPOSITORY_TITLE = ($env:BUILD_REPOSITORY_NAME -split '/')[-1]
Write-Host "##vso[task.setvariable variable=BUILD_REPOSITORY_TITLE;]$env:BUILD_REPOSITORY_TITLE"
gci env:
displayName: 'Set BUILD_REPOSITORY_TITLE'

- template: sdk-unified/steps/checkout/v1.yml@yaml-templates
parameters:
Expand Down
6 changes: 3 additions & 3 deletions tools/devops/automation/templates/governance/apiscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ steps:
- task: TSAUpload@2
inputs:
GdnPublishTsaOnboard: true
GdnPublishTsaConfigFile: '$(System.DefaultWorkingDirectory)\\$(Build.Repository.Title)\\tools\\devops\\governance\\tsa_config.gdntsa'
GdnPublishTsaConfigFile: '$(System.DefaultWorkingDirectory)\\$(BUILD_REPOSITORY_TITLE)\\tools\\devops\\governance\\tsa_config.gdntsa'
GdnPublishTsaExportedResultsPublishable: true
displayName: Create bugs for compliance tools results
condition: succeededOrFailed()
env:
WorkingDirectory: '$(Build.SourcesDirectory)/$(Build.Repository.Title)'
WorkingDirectory: '$(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: Break on compliance issues
condition: false # do not break for APIScan until we have fixed the issues
inputs:
GdnBreakAllTools: true
GdnBreakSuppressionFiles: $(Build.SourcesDirectory)\$(Build.Repository.Title)\tools\devops\governance\falsepositives.gdnsuppress
GdnBreakSuppressionFiles: $(Build.SourcesDirectory)\$(BUILD_REPOSITORY_TITLE)\tools\devops\governance\falsepositives.gdnsuppress
GdnBreakSuppressionSets: falsepositives
GdnBreakOutputSuppressionFile: $(Build.ArtifactStagingDirectory)\GuardianSuppressions\falsepositives.gdnsuppress
GdnBreakOutputSuppressionSet: falsepositives
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/templates/variables/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ variables:

# the name of our repository
- name: BUILD_REPOSITORY_TITLE
value: 'xamarin-macios'
value: ${{ split(variables['Build.Repository.Name'],'/')[1] }}

# point to the vsdrops that we will be using for the diff uploads.
- name: VSDropsPrefix
Expand Down

8 comments on commit 253887e

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ [CI Build #253887e] Build passed (CodeQL) ✅

Pipeline on Agent
Hash: 253887e02730a54745b5575c31027830fa0541b5 [CI build]

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.