Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed batch pipeline and added internal project constrain #33022

Merged
merged 2 commits into from
Mar 6, 2025
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
File renamed without changes.
125 changes: 63 additions & 62 deletions eng/pipelines/templates/stages/archetype-spec-gen-sdk.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:

Check failure on line 1 in eng/pipelines/templates/stages/archetype-spec-gen-sdk.yml

View workflow job for this annotation

GitHub Actions / Protected Files

File 'eng/pipelines/templates/stages/archetype-spec-gen-sdk.yml' should only be updated by the Azure SDK team. If intentional, the PR may be merged by the Azure SDK team via bypassing the branch protections.
- name: SpecRepoUrl
type: string
- name: SdkRepoUrl
Expand Down Expand Up @@ -209,69 +209,70 @@
parameters:
ArtifactName: $(PipelineArtifactsName)
ArtifactPath: $(GeneratedSDK.StagedArtifactsFolder)

- task: PowerShell@2
displayName: Add label to the spec PR
condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables['BreakingChangeLabel'], ''), eq(variables['BreakingChangeLabelAction'], 'add'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Add-IssueLabels.ps1
arguments: >
-RepoOwner $(SpecRepoOwner)
-RepoName $(SpecRepoName)
-IssueNumber "$(System.PullRequest.PullRequestNumber)"
-Labels $(BreakingChangeLabel)
-AuthToken "$(azuresdk-github-pat)"

- task: PowerShell@2
displayName: Remove label from the spec PR
condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables['BreakingChangeLabel'], ''), eq(variables['BreakingChangeLabelAction'], 'remove'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Remove-IssueLabel.ps1
arguments: >
-RepoOwner $(SpecRepoOwner)
-RepoName $(SpecRepoName)
-IssueNumber "$(System.PullRequest.PullRequestNumber)"
-LabelName $(BreakingChangeLabel)
-AuthToken "$(azuresdk-github-pat)"
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- task: PowerShell@2
displayName: Add label to the spec PR
condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables['BreakingChangeLabel'], ''), eq(variables['BreakingChangeLabelAction'], 'add'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Add-IssueLabels.ps1
arguments: >
-RepoOwner $(SpecRepoOwner)
-RepoName $(SpecRepoName)
-IssueNumber "$(System.PullRequest.PullRequestNumber)"
-Labels $(BreakingChangeLabel)
-AuthToken "$(azuresdk-github-pat)"

- ${{ if eq(parameters.SkipPullRequestCreation, false) }}:
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
parameters:
BaseRepoBranch: $(PrBranch)-$(Build.BuildId)
BaseRepoOwner: azure-sdk
CommitMsg: $(GeneratedSDKInformation)
TargetRepoOwner: $(SdkRepoOwner)
TargetRepoName: $(SdkRepoName)
PushArgs: "--force"
WorkingDirectory: $(SdkRepoDirectory)
ScriptDirectory: $(SdkRepoDirectory)/eng/common/scripts
- task: PowerShell@2
displayName: Remove label from the spec PR
condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables['BreakingChangeLabel'], ''), eq(variables['BreakingChangeLabelAction'], 'remove'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Remove-IssueLabel.ps1
arguments: >
-RepoOwner $(SpecRepoOwner)
-RepoName $(SpecRepoName)
-IssueNumber "$(System.PullRequest.PullRequestNumber)"
-LabelName $(BreakingChangeLabel)
-AuthToken "$(azuresdk-github-pat)"

- ${{ if eq(parameters.SkipPullRequestCreation, false) }}:
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
parameters:
BaseRepoBranch: $(PrBranch)-$(Build.BuildId)
BaseRepoOwner: azure-sdk
CommitMsg: $(GeneratedSDKInformation)
TargetRepoOwner: $(SdkRepoOwner)
TargetRepoName: $(SdkRepoName)
PushArgs: "--force"
WorkingDirectory: $(SdkRepoDirectory)
ScriptDirectory: $(SdkRepoDirectory)/eng/common/scripts

- ${{ if not(endsWith(variables['SdkRepoName'], '-pr')) }}:
- task: PowerShell@2
displayName: Create pull request
condition: and(succeeded(), eq(variables['HasChanges'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Submit-PullRequest.ps1
arguments: >
-RepoOwner "$(SdkRepoOwner)"
-RepoName "$(SdkRepoName)"
-BaseBranch "main"
-PROwner "azure-sdk"
-PRBranch "$(PrBranch)-$(Build.BuildId)"
-AuthToken "$(azuresdk-github-pat)"
-PRTitle "$(PrTitle)-generated-from-$(Build.DefinitionName)-$(Build.BuildId)"
-PRBody "$(GeneratedSDKInformation)"
-OpenAsDraft $true
- ${{ if not(endsWith(variables['SdkRepoName'], '-pr')) }}:
- task: PowerShell@2
displayName: Create pull request
condition: and(succeeded(), eq(variables['HasChanges'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
pwsh: true
workingDirectory: $(SdkRepoDirectory)
filePath: $(SdkRepoDirectory)/eng/common/scripts/Submit-PullRequest.ps1
arguments: >
-RepoOwner "$(SdkRepoOwner)"
-RepoName "$(SdkRepoName)"
-BaseBranch "main"
-PROwner "azure-sdk"
-PRBranch "$(PrBranch)-$(Build.BuildId)"
-AuthToken "$(azuresdk-github-pat)"
-PRTitle "$(PrTitle)-generated-from-$(Build.DefinitionName)-$(Build.BuildId)"
-PRBody "$(GeneratedSDKInformation)"
-OpenAsDraft $true

- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/common/pipelines/templates/steps/detect-api-changes.yml
parameters:
ArtifactPath: $(GeneratedSDK.StagedArtifactsFolder)
ArtifactName: $(PipelineArtifactsName)
RepoRoot: $(SdkRepoDirectory)
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/common/pipelines/templates/steps/detect-api-changes.yml
parameters:
ArtifactPath: $(GeneratedSDK.StagedArtifactsFolder)
ArtifactName: $(PipelineArtifactsName)
RepoRoot: $(SdkRepoDirectory)
Loading