From 86b7cfcf04177496ab98442224e5d21634d8dd33 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Fri, 4 Oct 2024 09:30:47 +0000 Subject: [PATCH 1/4] CHANGELOG: add CHANGELOG.md add a draft of the changelog for containerd-shim-wasm following the https://keepachangelog.com/en/1.1.0/ format. The changelog starts from the v0.15.1 release to HEAD. it is expected that the future PRs will update the CHANGELOG.md with the changes made. Signed-off-by: jiaxiao zhou --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..d74a6c54 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +# Changelog + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] - YYYY-MM-DD + +### Added + +- Added MQTT trigger and tests ([#175](https://github.com/spinkube/containerd-shim-spin/pull/175)) +- Make container environment bariables accessible as application variables ([#149](https://github.com/spinkube/containerd-shim-spin/pull/149)) +- Added feature to conditionally restart the k0s controller service when present during node installation. ([#167](https://github.com/spinkube/containerd-shim-spin/pull/167)) + +### Changed + +- Updated the minimum required Rust version to 1.79 ([#191](https://github.com/spinkube/containerd-shim-spin/pull/191)) +- Refactored the shim code by splitting it into different modules ([#185](https://github.com/spinkube/containerd-shim-spin/pull/185)) +- Refactored the Makefile to improve its structure and comments([#171](https://github.com/spinkube/containerd-shim-spin/pull/171)) +- Merged two Redis trigger test apps into one ([#176](https://github.com/spinkube/containerd-shim-spin/pull/176)) +- Simplified the run command in the documentation ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184)) +- Modified Dependabot settings to group patch-level dependency updates ([#162](https://github.com/spinkube/containerd-shim-spin/pull/162)) + +### Fixed + +- Correct currently supported triggers ([#182](https://github.com/spinkube/containerd-shim-spin/pull/182)) +- Fixed an error in `setup-linux.sh` script ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184)) +- Updated outdated links to `spinkube.dev` ([#170](https://github.com/spinkube/containerd-shim-spin/pull/170)) + +--- + +[Unreleased]: https://github.com/spinkube/containerd-shim-spin/compare/v0.15.1...HEAD \ No newline at end of file From cfd46c52040ab7bd124ff93d867c3d5ea8fe79bd Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Fri, 4 Oct 2024 09:32:30 +0000 Subject: [PATCH 2/4] scripts, .github/workflows/release.yaml: add script to extract changelog the new scripts/extract-changelog.sh script is used to extract the changelog from a tag name. This script is used in the release.yaml workflow to extract the changelog for the release notes. it also updates the release.yaml workflow to determine a prerelease based on the tag name. Signed-off-by: jiaxiao zhou --- .github/workflows/release.yaml | 21 ++++++++++++++++++--- scripts/extract-changelog.sh | 12 ++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 scripts/extract-changelog.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 96730d93..216bff7f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,15 +47,30 @@ jobs: mkdir -p _dist cp ./deployments/workloads/runtime.yaml _dist/runtime.yaml cp ./deployments/workloads/workload.yaml _dist/workload.yaml - + + - name: extract changelog + run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + cd $GITHUB_WORKSPACE + ./scripts/extract-changelog.sh $TAG_NAME > RELEASE_NOTES.md + cat RELEASE_NOTES.md + - name: create release if: startsWith(github.ref, 'refs/tags/v') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + if [[ "$TAG_NAME" =~ .+-pre.* ]]; then + PRERELEASE_ARGS="--prerelease --latest=false" + else + PRERELEASE_ARGS="" + fi gh release create ${{ env.RELEASE_VERSION }} \ - --generate-notes \ - -p \ + --notes-file RELEASE_NOTES.md \ + --title ${{ env.RELEASE_VERSION }} \ + --verify-tag + $PRERELEASE_ARGS \ _dist/runtime.yaml#example-runtimes \ _dist/workload.yaml#example-workloads \ diff --git a/scripts/extract-changelog.sh b/scripts/extract-changelog.sh new file mode 100755 index 00000000..58b1c5e2 --- /dev/null +++ b/scripts/extract-changelog.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Inspired by https://stackoverflow.com/questions/40450238/parse-a-changelog-and-extract-changes-for-a-version +# This script will extract the changelog for a specific version from the CHANGELOG.md file +# Usage: ./extract-changelog.sh +version=$1 + +awk -v ver="$version" ' +/^## \[.*\]/ { + if (p) exit + if ($0 ~ "^## \\[" ver "\\]") { p=1; next } +} +p' CHANGELOG.md \ No newline at end of file From 3228d19809819330a229ef58c7e166bdffa1b0eb Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Fri, 4 Oct 2024 09:49:58 +0000 Subject: [PATCH 3/4] release: add changelog to the release process Signed-off-by: jiaxiao zhou --- release.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/release.md b/release.md index 59df5aed..aa90a78b 100644 --- a/release.md +++ b/release.md @@ -8,14 +8,21 @@ following: commit selected to be tagged and released. 1. Change all references of the version number in package - [Cargo.toml](./Cargo.toml), crate - [Cargo.toml](./containerd-shim-spin/Cargo.toml), - [quickstart](./containerd-shim-spin/quickstart.md), [README](./README.md), - [deployments](./deployments/), and [images](./images/). Run `cargo build + + * [Cargo.toml](./Cargo.toml), + * crate [Cargo.toml](./containerd-shim-spin/Cargo.toml), + * [quickstart](./containerd-shim-spin/quickstart.md), + * [README](./README.md), + * [deployments](./deployments/), + * [images](./images/). + * [CHANGELOG.md](./CHANGELOG.md) the Unreleased section should be updated with the new version number and the date of the release. Update the links to new version tag in the footer of CHANGELOG.md + + Run `cargo build --release` to make sure lockfiles reflect Cargo.toml updates. Add a new column to the [README shim and Spin version map](./README.md#shim-and-spin-version-map) that lists the version of the Spin dependencies for the release. + 1. Create a pull request with these changes and merge once approved. From b45a820fc910e0830fe32531c9400deeb49e7337 Mon Sep 17 00:00:00 2001 From: Jiaxiao Zhou Date: Fri, 4 Oct 2024 12:35:43 -0700 Subject: [PATCH 4/4] Update CHANGELOG.md Co-authored-by: Kate Goldenring --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d74a6c54..172d4833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Added - Added MQTT trigger and tests ([#175](https://github.com/spinkube/containerd-shim-spin/pull/175)) -- Make container environment bariables accessible as application variables ([#149](https://github.com/spinkube/containerd-shim-spin/pull/149)) +- Make container environment variables accessible as application variables ([#149](https://github.com/spinkube/containerd-shim-spin/pull/149)) - Added feature to conditionally restart the k0s controller service when present during node installation. ([#167](https://github.com/spinkube/containerd-shim-spin/pull/167)) ### Changed