Context
We use Azure DevOps for our Git Repos, Azure Pipelines for our CI/CD and Azure Artifacts for our private hosting of our python packages.
Goal
I want to:
Tag a Git repo with Python Package version from Azure Pipelines in Azure DevOps Git repo
Example
git tag -a "$(python setup.py --version)" -m "Released version $(python setup.py --version)"
I have read the Azure documentation but it seems they all use the Azure Pipeline variables for build number.
On a build pipeline, there is a check box to tag the repo on successfully building the wheel artifact.
But I'm not sure how to expose the package version as a pipeline variable since this job has no spot for me to escape to perform custom code. I'm sure there is a way to do it but I'm at the point where I need help and the documentation isn't guiding me to the right places based on what I'm querying and reading.