diff --git a/docs/developer/readme.md b/docs/developer/readme.md index c8868ec51dc..cd16dc30f3b 100644 --- a/docs/developer/readme.md +++ b/docs/developer/readme.md @@ -1,6 +1,14 @@ -# 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 - -[main_docs]: https://github.com/Azure/autorest/blob/master/docs/developer/readme.md \ No newline at end of file +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 diff --git a/eng/pipelines/ci-template.yml b/eng/pipelines/ci-template.yml index 0e062bfb8a9..cc565f49ed1 100644 --- a/eng/pipelines/ci-template.yml +++ b/eng/pipelines/ci-template.yml @@ -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