-
Notifications
You must be signed in to change notification settings - Fork 68
Release Instructions
Hanzhang Zeng edited this page Feb 17, 2021
·
32 revisions
https://azfunc.visualstudio.com/Azure%20Functions/_release?_a=releases&view=mine&definitionId=43
- Create a new release pipeline
- Fill in NewLibraryVersion parameter, for example, 1.6.3b
- Deploy each step and go through instructions in manual intervention steps
Please follow these steps in order to make a release:
- Check the prerequisites listed below and ensure
git flow
is properly setup. - Ensure that build bots in the
dev
branch are green. - Create a new release branch -
release/X.Y.Z
and checkout.- We use a version of GitHub flow for release - creating a branch for release.
- Use command
git flow release start <major>.<minor>.<patch>
to create a new local release branch.
- Increase the version field in
azure.functions.__init__.py
. - Push the commit with the new version to the
release/X.Y.Z
branch.- Use command
git flow release publish <major>.<minor>.<patch>
to push the branch into remote repository. - If the above command fails (either due to origin not set correctly or unavailable), please use
git push <remote-alias-pointing-to-azure>
to push the release branch to Azure.
- Use command
- Make a TestPyPI release from the
release/X.Y.Z
branch, this will be used in azure-functions-worker E2E test. Check /Prerequisites/ below:
rm dist/*
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Verify in the Cheese shoppe: azure-functions · TestPyPI
- Start a new run from the dev branch of the azure-functions-python-worker - Using the Run Pipelines option and choosing the dev branch. This will run the E2E pipeline with the new Test version of the python library, as defined in the linux_devops_build.sh file.
- Wait for the azure-functions-python-worker E2E to run with the new azure-functions library on test.pypi.
- Once green - proceed.
- If red, then add the hotfix in the release branch, publish the new wheel, and test again.
Verify the release in the Cheese shoppe: azure-functions · PyPI
-
Tag the
release/X.Y.Z
commit when making a GitHub release (e.g. 1.1.0) and merge therelease/X.Y.Z
back tomaster
anddev
branches.- This can be simplified by
git flow release finish <major>.<minor>.<patch>
- back merge dev
- forward master
- create a new
<major>.<minor>.<patch>
tag
- This can be simplified by
-
Remember to push update the latest dev, master, and upload the tag to the remote repository.
-
In the release page, once you push the new tag, you should see it.
-
Make an official PyPi release:
rm dist/*
python setup.py sdist bdist_wheel
twine upload dist/*
- Create a new release/X.Y.Z branch in the azure-functions-python-worker repo.
- Change the
azure-functions
version in the worker repo and create a PR to the worker dev branch (e.g. Sample PR) - This changes the production version used in the worker. - Ensure that build bots are green for step 4 (tests are currently coupled between the worker and library repos).
- Twine is a PyPi upload tool that can be installed with pip.
-
Wheel is used for generating
bdist_wheel
on packaging.
pip install twine wheel
- You may need to set up the
~/.pypirc
file for your test.pypi credentials.(Instructions here) - Git flow setup
git flow init
production release => master
next release => dev
feature prefix => <alias>/
bugfix prefix => bugfix/
release prefix => release/
hotfix prefix => hotfix/
support prefix => support/
version tag prefix => ''