Skip to content

Release Instructions

Hanzhang Zeng edited this page Feb 16, 2021 · 45 revisions

Release Instructions

Try out the new release pipeline here

https://azfunc.visualstudio.com/Azure%20Functions/_release?_a=releases&view=mine&definitionId=42

  1. Create a new release pipeline
  2. Fill in NewWorkerVersion parameter, for example, 1.1.8
  3. Deploy each step and go through instructions in manual intervention steps

Flow

Python Library -> Python Worker -> Function Host -> Functions Docker -> Toolings

Please follow these steps in order to make a release

  1. Ensure that build bots in the dev branch are green.

  2. 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.
  3. Increase the version field in setup.py.

  4. Update setup.py to include the latest host binaries when available for the current sprint (https://github.com/Azure/azure-functions-host/releases) and, if needed, update the corresponding dotnet version in azure-pipelines.yml.

    • Replacing the WEBHOST_URL to the latest host release.
  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.
    • 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. Push the version and host binary updates to the master branch.
  6. Verify that the build bots are still green. Check the following pipelines:

  7. Create a Git tag (e.g. 1.1.2) on the dev branch with the GitHub release note and correspond it to the new version.

  8. Make a PyPi release:

    $ rm dist/*
    $ python setup.py sdist bdist_wheel
    $ twine upload dist/*

    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
  9. Release the NuGet artifact to MyGet

    • Push a new branch with the name release/2.X.Y.Z and release/3.X.Y.Z in the repository.
    • Wait for the build success
    • Azure DevOps -> Releases -> release/x.X.Y.Z branch -> Publish Worker Environment NuGet -> Deploy
  10. Update Python Worker artifact version in Azure Functions Host

  11. Update Python Worker artifact version in Azure Functions Core Tools

Checks before release

  • Update the version field in setup.py
  • Update the packages field in setup.py if you're including a new module
  • Inspect the build pipeline artifact and make sure everything you want is in there
  • Tag the master branch
  • Make a release note on GitHub

Checks when releasing to Azure Functions Host & Azure Functions Core Tools

  • Push a release/2.x.xxxxx and release/3.x.xxxxx branches in repository
  • Update the artifact version in Azure Functions Host
  • Update the artifact version in Azure Functions Core Tools