This repository serves two purposes and they are independent:
src
, to host your extension source code.For documentation on authoring an extension, see Extension Documentation
src/index.json
.https://aka.ms/azure-cli-extension-index-v1
every few minutes.az extension add --source https://contoso.com/mywheel.whl
.az extension list-available
command and to update to a new version of your extension, the user has to first remove the currently installed extension and then add the new version.Add your extension to the index to make it available in these CLI commands:
az extension add --name NAME
- Allows users to add an extension by nameaz extension list-available
- Allows users to list the available extensions in the indexaz extension update --name NAME
- Allows users to update an extensionsrc
directory.src/<extension root>/azext_*/vendored_sdks
..github/CODEOWNERS
..whl
) will not live in this repository. You can publish your extension to PyPI or somewhere else such as Azure Storage.There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json
automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but not to modify src/index.json
.
If you want to host the source code in your dedicated repo, you have to upload the WHL file and update the src/index.json
manually.
For detail, please visit Publish section in Azure CLI Extension Authoring.
If you use azdev extension update-index
the command will calculate the SHA256 digest for you. For more information visit https://github.com/Azure/azure-cli-dev-tools.
As a fallback:
MacOS
shasum -a 256 path_to_whl.whl
Windows / PowerShell
Get-FileHash path_to_whl.whl -Algorithm SHA256
Note: Hash should be in lowercase in index.json otherwise CI will fail.
The azdev extension update-index
command can be used to simplify the process of updating the index file. Run azdev extension update-index <URL>
where URL is the fully-qualified URL to your published extension WHL. This will gather the appropriate metadata and add an entry for your extension to the index. For more information visit https://github.com/Azure/azure-cli-dev-tools.
As a fallback:
The metadata needed to be filled is a combination of the contents present in:
metadata.json
located in your unzipped extension artifact (.whl
file) in the <package>-<version>.dist-info
directory. This metadata is garnered from the setup.py
folder.azext_metadata.json
(if it exists) under your extension.Note that CI will fail if this metadata does not match the contents of your published extension.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Version | Tag | Published |
---|---|---|
0.1.6 | 4yrs ago | |
0.1.5 | 4yrs ago | |
0.1.4 | 4yrs ago | |
0.1.3 | 4yrs ago |