Skip to content
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
16 changes: 12 additions & 4 deletions docs/developer/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# <img align="center" src="../images/logo.png"> Developing and Contributing to Python AutoRest
# Developing and Contributing

Docs will be added. See the [main docs][main_docs] for some information.
## Testing `@azure-tools/typespec-python` Tarballs

<!-- LINKS -->
[main_docs]: https://github.com/Azure/autorest/blob/master/docs/developer/readme.md
To test an unpublished branded emitter tarball, please follow these steps:

1. Go to the pipelines and find the run you'd like to test [here](https://dev.azure.com/azure-sdk/public/_build?definitionId=1316&_a=summary)
2. Open the run and find the artifacts published as part of that run.
3. Choose the published artifact you'd like to test, there will be one for each matrix run.
4. Click on the three dots and click "Copy download url"
5. Copy-paste that url, then head over to the [`emitter-package.json`](https://github.com/Azure/azure-sdk-for-python/blob/main/eng/emitter-package.json) in the [`azure-sdk-for-python`](https://github.com/Azure/azure-sdk-for-python/tree/main) repo
6. Paste the url as the version for the `"@azure-tools/typespec-python"` package
7. Run `tsp-client generate-lock-file` from the `azure-sdk-for-python/eng` folder
8. Go to the sdk you'd like to regenerate with the tarball, then run `tsp-client update` how you normally would
14 changes: 13 additions & 1 deletion eng/pipelines/ci-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,20 @@ steps:

- script: |
pnpm pack
AbsolutePkgPath=$(find "$(pwd)" -name "autorest-python-*" -maxdepth 1)
AbsolutePkgPath=$(find "$(pwd)" -name "*.tgz" -maxdepth 1)
echo "##vso[task.setvariable variable=PackagePath]$AbsolutePkgPath"
# Extract full tarball filename (remove path only)
TarballName=$(basename "$AbsolutePkgPath")
echo "##vso[task.setvariable variable=TarballName]$TarballName"
cd ../..
pnpm install $AbsolutePkgPath -w --verbose
displayName: Test tarball
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.folderName}}/

- task: PublishPipelineArtifact@1
displayName: Publish ${{ parameters.folderName }} package
inputs:
targetPath: "$(PackagePath)"
publishLocation: "pipeline"
artifactName: "$(TarballName)"
continueOnError: true
Loading