1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
trigger: none
extends:
template: /eng/pipelines/templates/stages/1es-redirect.yml
parameters:
stages:
- stage: TspSpecSync
jobs:
- job: TspSpecSync
displayName: 'TSP Spec Sync Job'
pool:
name: 'azsdk-pool'
image: 'ubuntu-24.04'
os: 'linux'
steps:
- task: UsePythonVersion@0
displayName: 'Set up Python'
inputs:
versionSpec: '3.10'
addToPath: true
- script: |
npm install -g @azure-tools/typespec-client-generator-cli@latest
displayName: 'Install tsp-client'
- script: |
git config --global user.name "ADO Pipeline"
git config --global user.email "ado_pipeline@microsoft.com"
displayName: 'Configure Git'
- script: |
tsp-client update --local-spec-repo ../../specs/modeltypes
displayName: 'Run TSP Client Update'
workingDirectory: '$(Build.SourcesDirectory)/sdk/core/azure-core/tests/specs_sdk/modeltypes'
- script: |
changes=$(git status --porcelain)
if [ -n "$changes" ]; then
echo "##vso[task.setvariable variable=hasChanges]true"
else
echo "##vso[task.setvariable variable=hasChanges]false"
fi
displayName: 'Check for changes'
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
parameters:
PRBranchName: 'automated/tsp-update-$(date +%Y%m%d%H%M%S)'
PRTitle: 'Auto-update TSP client generated code'
PRBody: |
This PR was automatically created in response to changes in `emitter-package.json`.
It updates the TSP client generated code. Tests should run automatically as part of the PR validation.
Generated from workflow triggered by PR #$(System.PullRequest.PullRequestNumber).
CommitMsg: 'Auto-update TSP client generated code'
|