Skip to content

Commit

Permalink
Publish GA packages to dev feed (Azure#11341)
Browse files Browse the repository at this point in the history
* Publish packages to dev feed

* Promote job variable to pipeline parameter
  • Loading branch information
chidozieononiwu authored May 9, 2020
1 parent 658767a commit 8cf46f2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
26 changes: 19 additions & 7 deletions eng/pipelines/templates/stages/archetype-python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ parameters:
ArtifactName: 'not-specified'
DependsOn: Build
DocArtifact: 'documentation'
DevFeedName: public/azure-sdk-for-python

stages:
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:
Expand Down Expand Up @@ -82,6 +83,11 @@ stages:
inputs:
pythonUploadServiceConnection: 'pypi.org - azure-sdk'

- task: TwineAuthenticate@0
displayName: 'Authenticate to feed: ${{parameters.DevFeedName}}'
inputs:
artifactFeeds: ${{parameters.DevFeedName}}

- script: |
set -e
twine upload --repository 'pypi' --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.whl
Expand All @@ -90,6 +96,14 @@ stages:
echo "Uploaded zip to pypi"
displayName: 'Publish package to registry: pypi.org'
- script: |
set -e
twine upload --repository ${{parameters.DevFeedName}} --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.whl
echo "Uploaded whl to devops feed"
twine upload --repository ${{parameters.DevFeedName}} --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.zip
echo "Uploaded sdist to devops feed"
displayName: 'Publish package to feed: ${{parameters.DevFeedName}}'
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
- deployment: PublishDocs
displayName: Publish Docs to GitHubIO Blob Storage
Expand Down Expand Up @@ -161,8 +175,6 @@ stages:
- job: PublishPackages
displayName: "Publish package to daily feed"
condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))
variables:
devFeedName: public/azure-sdk-for-python
pool:
vmImage: ubuntu-18.04
steps:
Expand All @@ -177,9 +189,9 @@ stages:
displayName: Install Twine
- task: TwineAuthenticate@0
displayName: 'Authenticate to feed: $(devFeedName)'
displayName: 'Authenticate to feed: ${{parameters.DevFeedName}}'
inputs:
artifactFeeds: $(devFeedName)
artifactFeeds: ${{parameters.DevFeedName}}

- ${{ each artifact in parameters.Artifacts }}:

Expand All @@ -196,9 +208,9 @@ stages:
- script: |
set -e
twine upload --repository $(devFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.whl
twine upload --repository ${{parameters.DevFeedName}} --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.whl
echo "Uploaded whl to devops feed"
twine upload --repository $(devFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.zip
twine upload --repository ${{parameters.DevFeedName}} --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.zip
echo "Uploaded sdist to devops feed"
displayName: 'Publish package to feed: $(devFeedName)'
displayName: 'Publish package to feed: ${{parameters.DevFeedName}}'
condition: gt(variables['FilesToUploadCount'], 0)
2 changes: 1 addition & 1 deletion sdk/template/azure-template/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release History

## 0.0.3 (Unreleased)

## 0.0.2 (2020-03-24)
- Test Release Pipeline
Expand Down
2 changes: 1 addition & 1 deletion sdk/template/azure-template/azure/template/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# matches SEMVER
VERSION = "0.0.2"
VERSION = "0.0.3"

0 comments on commit 8cf46f2

Please sign in to comment.