-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[EngSys] Restrict docs release jobs to public repo only #48123
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -344,7 +344,7 @@ stages: | |||||
| - ${{ if eq(parameters.PublicFeedUrl, 'maven.org') }}: | ||||||
| - job: PublishDocsMs | ||||||
| displayName: Docs.MS Release | ||||||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) | ||||||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr')) | ||||||
| dependsOn: PublishDevFeedPackage | ||||||
|
|
||||||
| pool: | ||||||
|
|
@@ -382,7 +382,7 @@ stages: | |||||
|
|
||||||
| - job: PublishDocs | ||||||
| displayName: Publish Docs to GitHubIO Blob Storage | ||||||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) | ||||||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr')) | ||||||
|
||||||
| dependsOn: PublishDevFeedPackage | ||||||
| pool: | ||||||
| name: $(WINDOWSPOOL) | ||||||
|
|
@@ -465,7 +465,7 @@ stages: | |||||
|
|
||||||
| - job: PublishDocsToNightlyBranch | ||||||
| dependsOn: PublishPackages | ||||||
| condition: and(succeeded(), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))) | ||||||
| condition: and(succeeded(), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr'), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))) | ||||||
|
||||||
| condition: and(succeeded(), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr'), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))) | |
| condition: and(succeeded(), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java'), or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,7 +232,7 @@ stages: | |
|
|
||
| - job: PublishDocsMs | ||
| displayName: Docs.MS Release | ||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) | ||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr')) | ||
|
||
| timeoutInMinutes: 180 | ||
| dependsOn: PublishDevFeedPackage | ||
|
|
||
|
|
@@ -274,7 +274,7 @@ stages: | |
|
|
||
| - job: PublishDocs | ||
| displayName: Publish Docs to GitHubIO Blob Storage | ||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) | ||
| condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr')) | ||
|
||
| timeoutInMinutes: 120 | ||
| dependsOn: PublishESRPPackage | ||
| variables: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conditions only block a single known mirror repo (
Azure/azure-sdk-for-java-pr), but still allow docs publishing to run from any other repo name (e.g., other mirrors/renames) if the pipeline is executed there. If the intent is truly “public repo only”, consider switching to an allowlist check (e.g.,eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java')) or combining both: allowlist the public repo and explicitly exclude known mirrors.