Skip to content

Commit

Permalink
Enable autobaseline for only rust - core
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Feb 26, 2025
1 parent 319a7c5 commit 203625b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 205 deletions.
144 changes: 0 additions & 144 deletions .config/1espt/PipelineAutobaseliningConfig.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .config/guardian/.gdnbaselines

This file was deleted.

16 changes: 12 additions & 4 deletions eng/pipelines/templates/jobs/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@ jobs:
os: linux

steps:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
paths:
- "/*"
# Pull requests require the target branch ref, but fetchDepth: 1 doesn't fetch additional refs.
# SDL Baselining requires a github token, but sparse checkout doesn't set one.
# Use Sparse Checkout for pull requests and native, shallow checkout for everything else.
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
paths:
- "/*"
- ${{ else }}:
- checkout: self
fetchDepth: 1
persistCredentials: true

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], '')) }}:
- script: |
Expand Down
11 changes: 11 additions & 0 deletions eng/pipelines/templates/stages/1es-redirect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ parameters:
- name: oneESTemplateTag
type: string
default: release
- name: AutoBaseline
type: boolean
default: false

extends:
${{ if and(parameters.Use1ESOfficial, eq(parameters.oneESTemplateTag, 'canary')) }}:
Expand All @@ -36,7 +39,15 @@ extends:
- 1ES.PT.Tag-refs/tags/canary
settings:
skipBuildTagsForGitHubPullRequests: true
# only enable autoBaseline for the internal build of rust-core on main branch
${{ if parameters.AutoBaseline }}:
featureFlags:
autoBaseline: true
sdl:
${{ if parameters.AutoBaseline }}:
autoBaseline:
isMainPipeline: true
enableForGitHub: true
sourceAnalysisPool:
name: azsdk-pool-mms-win-2022-general
image: azsdk-pool-mms-win-2022-1espt
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extends:
template: /eng/pipelines/templates/stages/1es-redirect.yml
parameters:
oneESTemplateTag: ${{ parameters.oneESTemplateTag }}
autoBaseline: ${{ and(eq(variables['Build.DefinitionName'], 'rust - core'), eq(variables['Build.SourceBranchName'], 'main'), eq(variables['System.TeamProject'], 'internal')) }}
stages:
- stage: Build
variables:
Expand Down

0 comments on commit 203625b

Please sign in to comment.