Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions common/config/azure-pipelines/npm-publish-rush.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ resources:
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: rushstackGitHubApp
type: github
name: microsoft/rushstack
endpoint: GitHubProjects
ref: refs/heads/main

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
settings:
networkIsolationPolicy: CFSClean,CFSClean2,CFSClean3,DefaultDeny
sdl:
sourceRepositoriesToScan:
include:
- repository: rushstackGitHubApp
pool:
name: Azure-Pipelines-1ESPT-ExDShared
os: windows
Expand All @@ -44,6 +53,7 @@ extends:
VersionPolicyName: rush
StageName: BumpRushVersions
StageDisplayName: 'Bump Rush Versions and Create PR'
CheckoutRepository: rushstackGitHubApp
FeatureBranch: 'automated/bump-versions-rush'
PrTitle: 'Bump Rush package versions'
PrDescription: |
Expand Down
10 changes: 10 additions & 0 deletions common/config/azure-pipelines/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ resources:
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: rushstackGitHubApp
type: github
name: microsoft/rushstack
endpoint: GitHubProjects
ref: refs/heads/main

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
settings:
networkIsolationPolicy: CFSClean,CFSClean2,CFSClean3,DefaultDeny
sdl:
sourceRepositoriesToScan:
include:
- repository: rushstackGitHubApp
pool:
name: Azure-Pipelines-1ESPT-ExDShared
os: windows
Expand All @@ -44,6 +53,7 @@ extends:
VersionPolicyName: noRush
StageName: BumpRushstackVersions
StageDisplayName: 'Bump Rushstack Versions and Create PR'
CheckoutRepository: rushstackGitHubApp
FeatureBranch: 'automated/bump-versions-rushstack'
PrTitle: 'Bump Rushstack package versions'
PrDescription: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ parameters:
type: string
- name: StageDisplayName
type: string
- name: CheckoutRepository
type: string
default: self
- name: FeatureBranch
type: string
- name: PrTitle
Expand Down Expand Up @@ -50,12 +53,16 @@ stages:
targetPath: $(Build.ArtifactStagingDirectory)/package-versions
artifactName: package-versions
steps:
- checkout: self
- checkout: ${{ parameters.CheckoutRepository }}
persistCredentials: true

- template: /common/config/azure-pipelines/templates/configure-git-user.yaml@self

- bash: |
# Repository resources resolve independently from the self trigger. Restore the exact
# commit that selected this pipeline YAML before creating the automated branch.
git fetch --no-tags origin "$(Build.SourceVersion)"
git checkout --detach "$(Build.SourceVersion)"
git checkout -b ${{ parameters.FeatureBranch }}
echo "Created feature branch: ${{ parameters.FeatureBranch }}"
displayName: 'Create Feature Branch'
Expand Down Expand Up @@ -85,6 +92,24 @@ stages:
fi
displayName: 'Commit Version Bumps'

- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
parameters:
Arguments: >
change
--bulk
--bump-type none
--commit-message "chore: generate change files for version bump"
DisplayName: 'Generate change files'
Condition: "and(succeeded(), eq(variables.HasChanges, 'true'))"

- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
parameters:
Arguments: >
change
--verify
DisplayName: 'Verify generated change files'
Condition: "and(succeeded(), eq(variables.HasChanges, 'true'))"

- script: 'node libraries/rush-lib/scripts/plugins-prepublish.js'
displayName: 'Prepublish workaround for rush-lib'

Expand Down