-
Notifications
You must be signed in to change notification settings - Fork 535
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
refactor: Inline yaml templates and fix bug #23418
Conversation
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.
Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- tools/pipelines/templates/download-api-extractor-artifact.yml: Language not supported
- tools/pipelines/templates/upload-json-steps.yml: Language not supported
Comments suppressed due to low confidence (1)
tools/pipelines/publish-api-model-artifact.yml:134
- [nitpick] The variable name 'isLatestMinorOfMajorTrain' should be verified to ensure it accurately reflects its purpose in the context.
isLatestMinorOfMajorTrain: $[ dependencies.check_branch_version.outputs['SetShouldDeploy.shouldDeploy'] ]
- name: isMain | ||
value: ${{ eq(variables['Build.SourceBranchName'], 'main') }} |
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.
Inlined below. Single use, and it's pretty self-explanatory.
- task: Bash@3 | ||
displayName: 'Print computed variables' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
echo "isLatestMinorOfMajorTrain: $(isLatestMinorOfMajorTrain)" | ||
echo "majorVersion: $(majorVersion)" |
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.
Added this new bit for troubleshooting
archiveFile: '$(Pipeline.Workspace)/$(Build.SourceVersion).tar.gz' | ||
replaceExistingArchive: true | ||
verbose: true # Optional | ||
#quiet: # Optional |
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.
nit: quiet can be removed?
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.
It could, I kept it just to keep the changes to the minimum necessary to simplify review. I'll merge like this for now.
@microsoft-github-policy-service rerun |
Description
The
upload-json-steps.yml
anddownload-api-extractor-artifact.yml
templates were not really that reusable so this PR inlines them into the single pipeline that uses them.It also fixes a bug that caused the JSON artifacts to never be published as
latest-v<major>.tar.gz
because we were trying to use a variable that only exists at runtime (dependencies.check_branch_version.outputs['SetShouldDeploy.shouldDeploy']
) in a "compile-time" condition inupload-json-steps.yml
. The condition was thus never true, and the step under it was never present in the pipeline. So I replaced a couple of compile-time conditionals withcondition:
nodes in the corresponding tasks, which should make the tasks always appear in the pipeline, but get skipped unless the specified conditions are true.Reviewer Guidance
The review process is outlined on this wiki page.
AB#6846