Skip to content

Release Instructions

Varad Meru edited this page Sep 30, 2020 · 32 revisions

Azure Functions Library Release instructions

Please follow these steps in order to make a release:

  1. Check the prerequisites listed below and ensure git flow is properly setup.
  2. Ensure that build bots in the dev branch are green.
  3. 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.
  4. Increase the version field in azure.functions.__init__.py.
  5. 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.
  6. 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

  1. 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.
  2. Make an official PyPi release:
rm dist/*
python setup.py sdist bdist_wheel
twine upload dist/*

Verify the release in the Cheese shoppe: azure-functions · PyPI

  1. Tag the release/X.Y.Z commit when making a GitHub release (e.g. 1.1.0) and merge the release/X.Y.Z back to master and dev 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
  2. Remember to push update the latest dev, master and upload the tag to the remote repository.

Continue releasing the worker

  1. Create a new release/X.Y.Z branch in the azure-functions-python-worker repo.
  2. 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.
  3. Ensure that build bots are green for step 4 (tests are currently coupled between the worker and library repos).

Prerequisites:

  • 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 => ''
Clone this wiki locally