Skip to content

How to Release

Daniel Lipovetsky edited this page Oct 18, 2022 · 24 revisions

How to Release

We use the convention ${UPSTREAM_VERSION}-d2iq.${DOWNSTREAM_VERSION}. For example, if latest tagged upstream version is v1.1.3, our first release with that version is v1.1.3-d2iq.0, our second release is v1.1.3-d2iq.1, and so on.

We should keep up to date with upstream. If there is a new upstream version, we should pull in the changes.

Prepare Environment

# Fetch all tags from upstream
git fetch upstream 'refs/tags/*:refs/tags/*'

# Use the upstream tag,e.g. v1.2.2
export UPSTREAM_VERSION=

# Start with 0, and increment for subsequent releases that use the same upstream patch version.
export DOWNSTREAM_RELEASE_VERSION=

export VERSION=${UPSTREAM_VERSION}-d2iq.${DOWNSTREAM_RELEASE_VERSION}
export RELEASE_TAG=${VERSION}

# Override upstream CAPI controller manager container image defaults
export REGISTRY=docker.io/mesosphere
export PROD_REGISTRY=$REGISTRY
export TAG=$VERSION

# Override upstream CAPD controller manager container image defaults
export STAGING_REGISTRY=$REGISTRY

Tag and push

# NOTE origin is assumed to be the remote that points to https://github.com/mesosphere/cluster-api

# checkout the branch
git checkout -b release/${VERSION} ${UPSTREAM_VERSION}

# cherry-pick d2iq changes
git cherry-pick 44689a320 1cd9ab71e b47c5fa41

# push release branch
git push origin release/${VERSION}

# tag and push the new release
git tag --sign ${VERSION} -m "${VERSION}"
git push origin ${VERSION}

# tag and push the new test release (for CAPD)
git tag --sign test/${VERSION} -m "${VERSION}"
git push origin test/${VERSION}

Build and push docker images

# NOTE Each arch requires its own registry. So far, we only have registries for amd64 and arm64.
# Build the CAPI and CAPD images for every arch
make ALL_ARCH="amd64 arm64" docker-build-all docker-capd-build-all

# Push the CAPI and CAPD images for every arch
make ALL_ARCH="amd64 arm64" docker-push-all docker-capd-push-all

Build and push the artifacts

# Build the CAPI and CAPD release artifacts
make release

# create the Github release and push the artifacts
export GITHUB_TOKEN=<>
gh release create --repo mesosphere/cluster-api --title ${VERSION} --notes "${VERSION}" ${VERSION}
gh release upload --repo mesosphere/cluster-api ${VERSION} out/*
Clone this wiki locally