Skip to content

How to Release

Daniel Lipovetsky edited this page Aug 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 most recent tag
export UPSTREAM_VERSION=v1.1.3
export VERSION=${UPSTREAM_VERSION}-d2iq.0
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

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

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

# tag and push the new release
git tag -s ${VERSION} -m ${UPSTREAM_VERSION}
git push origin ${VERSION}
git push origin release/${VERSION}

Build and push the artifacts

# Build the CAPI release artifacts
make release

# Build the CAPD release artifacts
cd test/infrastructure/docker && 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/*

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 images for every arch
make ALL_ARCH="amd64 arm64" docker-build-all
# Build the CAPD images
cd test/infrastructure/docker && ALL_ARCH="amd64 arm64" docker-build-all

# Push the CAPI images for every arch
make ALL_ARCH="amd64 arm64" docker-push-all
# Build the CAPD images
cd test/infrastructure/docker && make ALL_ARCH="amd64 arm64" docker-push-all
Clone this wiki locally