Skip to content

Commit fdb7689

Browse files
iscai-msftCopilot
andcommitted
ci: trigger azure-sdk-for-python regeneration after http-client-python publish
Add a Python_Notify stage to the http-client-python publish pipeline that dispatches a typespec-python-regenerate event to Azure/azure-sdk-for-python after successful publish. Uses login-to-github.yml to mint a GitHub App token via Azure Key Vault. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ef146dd commit fdb7689

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

packages/http-client-python/eng/pipeline/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,24 @@ extends:
3232
EnableCadlRanchReport: false
3333
PythonVersion: "3.11"
3434
UploadPlaygroundBundle: true
35+
36+
- stage: Python_Notify
37+
displayName: Python - Notify downstream
38+
dependsOn: Python_Publish
39+
condition: succeeded()
40+
pool:
41+
name: $(LINUXPOOL)
42+
image: $(LINUXVMIMAGE)
43+
os: linux
44+
jobs:
45+
- job: DispatchRegeneration
46+
displayName: Trigger azure-sdk-for-python regeneration
47+
steps:
48+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
49+
- script: |
50+
curl -f -X POST \
51+
-H "Accept: application/vnd.github+json" \
52+
-H "Authorization: Bearer $(GH_TOKEN)" \
53+
https://api.github.com/repos/Azure/azure-sdk-for-python/dispatches \
54+
-d '{"event_type":"typespec-python-regenerate","client_payload":{"sha":"$(Build.SourceVersion)"}}'
55+
displayName: Dispatch typespec-python-regenerate

0 commit comments

Comments
 (0)