Skip to content

Commit

Permalink
Document the existing release steps (Mirantis#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwneisen authored Jun 26, 2023
1 parent 15fa56a commit 45a2855
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
cri-dockerd
build
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
APP_DIR:=$(CURDIR)
PACKAGING_DIR:=$(CURDIR)/packaging
RELEASE_DIR:=$(CURDIR)/build/release

DATE_FMT=+%Y%m%d.%H%M%S
SOURCE_DATE_EPOCH?=$(shell git log -1 --pretty=%ct)
Expand Down Expand Up @@ -59,4 +60,36 @@ cross-arm: ## build static packages
.PHONY: clean
clean: ## clean the build artifacts
$(RM) cri-dockerd
$(RM) -r build
-$(MAKE) -C $(PACKAGING_DIR) clean

.PHONY: release
release: static-linux deb rpm cross-arm cross-mac cross-win ## build the release binaries
mkdir -p $(RELEASE_DIR)

# Copy the release files
# Debian
cp $(PACKAGING_DIR)/deb/debbuild/debian-bullseye/cri-dockerd_$(VERSION)~3-0~debian-bullseye_amd64.deb $(RELEASE_DIR)
cp $(PACKAGING_DIR)/deb/debbuild/debian-buster/cri-dockerd_$(VERSION)~3-0~debian-buster_amd64.deb $(RELEASE_DIR)
# Ubuntu
cp $(PACKAGING_DIR)/deb/debbuild/ubuntu-bionic/cri-dockerd_$(VERSION)~3-0~ubuntu-bionic_amd64.deb $(RELEASE_DIR)
cp $(PACKAGING_DIR)/deb/debbuild/ubuntu-focal/cri-dockerd_$(VERSION)~3-0~ubuntu-focal_amd64.deb $(RELEASE_DIR)
cp $(PACKAGING_DIR)/deb/debbuild/ubuntu-jammy/cri-dockerd_$(VERSION)~3-0~ubuntu-jammy_amd64.deb $(RELEASE_DIR)
# CentOS
cp $(PACKAGING_DIR)/rpm/rpmbuild/RPMS/x86_64/cri-dockerd-$(VERSION).*.el7.x86_64.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/RPMS/x86_64/cri-dockerd-$(VERSION).*.el8.x86_64.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/SRPMS/cri-dockerd-$(VERSION).*.el7.src.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/SRPMS/cri-dockerd-$(VERSION).*.el8.src.rpm $(RELEASE_DIR)
# Fedora
cp $(PACKAGING_DIR)/rpm/rpmbuild/RPMS/x86_64/cri-dockerd-$(VERSION).*.fc35.x86_64.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/RPMS/x86_64/cri-dockerd-$(VERSION).*.fc36.x86_64.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/SRPMS/cri-dockerd-$(VERSION).*.fc35.src.rpm $(RELEASE_DIR)
cp $(PACKAGING_DIR)/rpm/rpmbuild/SRPMS/cri-dockerd-$(VERSION).*.fc36.src.rpm $(RELEASE_DIR)
# arm
cp $(PACKAGING_DIR)/static/build/arm/cri-dockerd-$(VERSION).tgz $(RELEASE_DIR)/cri-dockerd-$(VERSION).arm64.tgz
# win
cp $(PACKAGING_DIR)/static/build/win/cri-dockerd-$(VERSION).zip $(RELEASE_DIR)/cri-dockerd-$(VERSION).win.amd64.zip
# mac
cp $(PACKAGING_DIR)/static/build/mac/cri-dockerd-$(VERSION).tgz $(RELEASE_DIR)/cri-dockerd-$(VERSION).darwin.amd64.tgz
# linux
cp $(PACKAGING_DIR)/static/build/linux/cri-dockerd-$(VERSION).tgz $(RELEASE_DIR)/cri-dockerd-$(VERSION).amd64.tgz
19 changes: 19 additions & 0 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release

This document covers the release process for `cri-dockerd`. This steps will need to be done by a project maintainer.

1. Setup the repo for a new release
a. Change the version found in `VERSION`, `cmd/version/version.go`, and `packaging/common.mk` to the new version
b. Create a PR with these changes and merge them to master
c. Build the release artifacts using `make release`
d. Verify the artifacts in the `build/release` directory and make sure they look correct
2. A maintainer creates a new draft release in the [repo's releases section](https://github.com/Mirantis/cri-dockerd/releases)
a. The name should follow semantic convention prepended with a 'v'
b. A tag with the same name should be created on the latest commit to master from the previous step
c. Release notes should be generated using the previous tag and the new tag as the range
d. Check the box to **Set as a pre-release**
e. Upload the release artifacts from the previous step
e. Save as a draft
3. The release can now go through a review process to look for any issues
4. Change the draft to a published release
5. Celebrate :beers:

0 comments on commit 45a2855

Please sign in to comment.