From 0aa82e7050ea20862d1b4a0072736a4474ebb7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 11:29:52 +0100 Subject: [PATCH 01/13] release: Add missing env vars to _check_required_env_var() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We missed doing this as part of 50011e89a0a47cfc639394f826cf3d1769a011e0, but we also need to check for: * RELEASE_VERSION * GH_TOKEN * ARCHITECTURE * KATA_STATIC_TARBALL While here, let's fix a ARCHITECURE -> ARCHITECTURE typo. Fixes: #9064 -- part II Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 46675c1bd9..9d9afea151 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -18,7 +18,7 @@ repo_root_dir="$(cd "$this_script_dir/../../../" && pwd)" IFS=' ' read -a IMAGE_TAGS <<< "${KATA_DEPLOY_IMAGE_TAGS:-}" IFS=' ' read -a REGISTRIES <<< "${KATA_DEPLOY_REGISTRIES:-}" GH_TOKEN="${GH_TOKEN:-}" -ARCHITECTURE="${ARCHITECURE:-}" +ARCHITECTURE="${ARCHITECTURE:-}" KATA_STATIC_TARBALL="${KATA_STATIC_TARBALL:-}" RELEASE_VERSION="${RELEASE_VERSION:-}" RELEASE_TYPE="${RELEASE_TYPE:-minor}" @@ -34,6 +34,10 @@ function _check_required_env_var() local env_var case ${1} in + RELEASE_VERSION) env_var="${RELEASE_VERSION}" ;; + GH_TOKEN) env_var="${GH_TOKEN}" ;; + ARCHITECTURE) env_var="${ARCHITECTURE}" ;; + KATA_STATIC_TARBALL) env_var="${KATA_STATIC_TARBALL}" ;; KATA_DEPLOY_IMAGE_TAGS) env_var="${KATA_DEPLOY_IMAGE_TAGS}" ;; KATA_DEPLOY_REGISTRIES) env_var="${KATA_DEPLOY_REGISTRIES}" ;; *) >&2 _die "Invalid environment variable \"${1}\"" ;; From d10b818de522448b80c8da943b116edc39553b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 12:15:43 +0100 Subject: [PATCH 02/13] release: Add missing return to _check_required_env_var() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise none of the calls to this function will actually continue after it's called. Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 9d9afea151..bfee358705 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -45,6 +45,8 @@ function _check_required_env_var() [ -z "${env_var}" ] && \ _die "\"${1}\" environment variable is required but was not set" + + return 0 } function _next_release_version() From 8023d64b1a246e4dfe564ade091d0dcdec2fcc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 11:36:46 +0100 Subject: [PATCH 03/13] release: Adjust "needs" in the release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without those we'll end up running steps in parallel that should actually wait for a previous step to be completed. While here, let's also correct some of the "needs" that were waiting fro the wrong workflow to be finished. Signed-off-by: Fabiano Fidêncio --- .github/workflows/release.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e54c356f2b..b52c9e64f7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,24 +33,28 @@ jobs: GH_TOKEN: ${{ github.token }} build-and-push-assets-amd64: + needs: release uses: ./.github/workflows/release-amd64.yaml with: target-arch: amd64 secrets: inherit build-and-push-assets-arm64: + needs: release uses: ./.github/workflows/release-arm64.yaml with: target-arch: arm64 secrets: inherit build-and-push-assets-s390x: + needs: release uses: ./.github/workflows/release-s390x.yaml with: target-arch: s390x secrets: inherit build-and-push-assets-ppc64le: + needs: release uses: ./.github/workflows/release-ppc64le.yaml with: target-arch: ppc64le @@ -86,7 +90,7 @@ jobs: KATA_DEPLOY_REGISTRIES: "quay.io/kata-containers/kata-deploy docker.io/katadocker/kata-deploy" upload-multi-arch-static-tarball: - needs: publish-multi-arch-images + needs: [build-and-push-assets-amd64, build-and-push-assets-arm64, build-and-push-assets-s390x, build-and-push-assets-ppc64le] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -141,6 +145,7 @@ jobs: ARCHITECTURE: ppc64le upload-versions-yaml: + needs: release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -151,7 +156,7 @@ jobs: GH_TOKEN: ${{ github.token }} upload-cargo-vendored-tarball: - needs: upload-multi-arch-static-tarball + needs: release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -162,7 +167,7 @@ jobs: GH_TOKEN: ${{ github.token }} upload-libseccomp-tarball: - needs: upload-cargo-vendored-tarball + needs: release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From d339366a16a022789293152f2552e9f2bf90bf18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 12:48:21 +0100 Subject: [PATCH 04/13] release: Get the release version from our internal function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is utterly counter intuitive, but if we change a file during the GitHub Action, the checkout done for the next workflow won't have that file updated, but rather the branch on its original state when the workflow was created. This makes us safe to always "calculate" the next release version from the VERSION file at the time the workflow was triggered. This requires us to have the release type exported for the whole workflow. Signed-off-by: Fabiano Fidêncio --- .github/workflows/release.yaml | 5 +++-- tools/packaging/release/release.sh | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b52c9e64f7..810b0a1bd9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,6 +6,9 @@ on: required: true type: string +env: + RELEASE_TYPE: ${{ inputs.release-type }} + jobs: release: runs-on: ubuntu-latest @@ -19,8 +22,6 @@ jobs: run: | release_version=$(./tools/packaging/release/release.sh next-release-version) echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV" - env: - RELEASE_TYPE: ${{ inputs.release-type }} - name: Update VERSION file run: | diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index bfee358705..170664e800 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -20,7 +20,6 @@ IFS=' ' read -a REGISTRIES <<< "${KATA_DEPLOY_REGISTRIES:-}" GH_TOKEN="${GH_TOKEN:-}" ARCHITECTURE="${ARCHITECTURE:-}" KATA_STATIC_TARBALL="${KATA_STATIC_TARBALL:-}" -RELEASE_VERSION="${RELEASE_VERSION:-}" RELEASE_TYPE="${RELEASE_TYPE:-minor}" function _die() @@ -131,7 +130,7 @@ function _upload_kata_static_tarball() _check_required_env_var "ARCHITECTURE" _check_required_env_var "KATA_STATIC_TARBALL" - [ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION") + RELEASE_VERSION="$(_next_release_version)" new_tarball_name="kata-static-${RELEASE_VERSION}-${ARCHITECTURE}.tar.xz" mv ${KATA_STATIC_TARBALL} "${new_tarball_name}" @@ -141,7 +140,7 @@ function _upload_kata_static_tarball() function _upload_versions_yaml_file() { - [ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION") + RELEASE_VERSION="$(_next_release_version)" versions_file="kata-containers-${RELEASE_VERSION}-versions.yaml" cp "${repo_root_dir}/versions.yaml" ${versions_file} @@ -152,7 +151,7 @@ function _upload_vendored_code_tarball() { _check_required_env_var "GH_TOKEN" - [ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION") + RELEASE_VERSION="$(_next_release_version)" vendored_code_tarball="kata-containers-${RELEASE_VERSION}-vendor.tar.gz" bash -c "${repo_root_dir}/tools/packaging/release/generate_vendor.sh ${vendored_code_tarball}" @@ -163,7 +162,7 @@ function _upload_libseccomp_tarball() { _check_required_env_var "GH_TOKEN" - [ -z "${RELEASE_VERSION}" ] && RELEASE_VERSION=$(cat "${repo_root_dir}/VERSION") + RELEASE_VERSION="$(_next_release_version)" INSTALL_IN_GO_PATH=false ${repo_root_dir}/ci/install_yq.sh From 757f9589436eb7ecaf70a392ee6bf6207dca0d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 14:22:54 +0100 Subject: [PATCH 05/13] release: Adjust tags used to publish our deamonset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to adjust the tags as when this workflow ends up being called from the release side, we'll receive "refs/tags/main" as the GITHUB_REF, and in that case we must use the release version. Signed-off-by: Fabiano Fidêncio --- .github/workflows/release-amd64.yaml | 8 ++++++-- .github/workflows/release-arm64.yaml | 8 ++++++-- .github/workflows/release-ppc64le.yaml | 8 ++++++-- .github/workflows/release-s390x.yaml | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-amd64.yaml b/.github/workflows/release-amd64.yaml index c197da0b56..97ae890e0d 100644 --- a/.github/workflows/release-amd64.yaml +++ b/.github/workflows/release-amd64.yaml @@ -41,8 +41,12 @@ jobs: # We need to do such trick here as the format of the $GITHUB_REF # is "refs/tags/" tag=$(echo $GITHUB_REF | cut -d/ -f3-) - tags=($tag) - tags+=($([[ "$tag" =~ "alpha"|"rc" ]] && echo "latest" || echo "stable")) + if [ "${tag}" = "main" ]; then + tag=$(./tools/packaging/release/release.sh next-release-version) + tags=(${tag} "latest") + else + tags=(${tag}) + fi for tag in ${tags[@]}; do ./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \ $(pwd)/kata-static.tar.xz "docker.io/katadocker/kata-deploy" \ diff --git a/.github/workflows/release-arm64.yaml b/.github/workflows/release-arm64.yaml index fd2c9065ee..c6d663407f 100644 --- a/.github/workflows/release-arm64.yaml +++ b/.github/workflows/release-arm64.yaml @@ -41,8 +41,12 @@ jobs: # We need to do such trick here as the format of the $GITHUB_REF # is "refs/tags/" tag=$(echo $GITHUB_REF | cut -d/ -f3-) - tags=($tag) - tags+=($([[ "$tag" =~ "alpha"|"rc" ]] && echo "latest" || echo "stable")) + if [ "${tag}" = "main" ]; then + tag=$(./tools/packaging/release/release.sh next-release-version) + tags=(${tag} "latest") + else + tags=(${tag}) + fi for tag in ${tags[@]}; do ./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \ $(pwd)/kata-static.tar.xz "docker.io/katadocker/kata-deploy" \ diff --git a/.github/workflows/release-ppc64le.yaml b/.github/workflows/release-ppc64le.yaml index bcdbb39deb..68e7ac19ce 100644 --- a/.github/workflows/release-ppc64le.yaml +++ b/.github/workflows/release-ppc64le.yaml @@ -41,8 +41,12 @@ jobs: # We need to do such trick here as the format of the $GITHUB_REF # is "refs/tags/" tag=$(echo $GITHUB_REF | cut -d/ -f3-) - tags=($tag) - tags+=($([[ "$tag" =~ "alpha"|"rc" ]] && echo "latest" || echo "stable")) + if [ "${tag}" = "main" ]; then + tag=$(./tools/packaging/release/release.sh next-release-version) + tags=(${tag} "latest") + else + tags=(${tag}) + fi for tag in ${tags[@]}; do ./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \ $(pwd)/kata-static.tar.xz "docker.io/katadocker/kata-deploy" \ diff --git a/.github/workflows/release-s390x.yaml b/.github/workflows/release-s390x.yaml index e81ae2392c..be3a46fc59 100644 --- a/.github/workflows/release-s390x.yaml +++ b/.github/workflows/release-s390x.yaml @@ -42,8 +42,12 @@ jobs: # We need to do such trick here as the format of the $GITHUB_REF # is "refs/tags/" tag=$(echo $GITHUB_REF | cut -d/ -f3-) - tags=($tag) - tags+=($([[ "$tag" =~ "alpha"|"rc" ]] && echo "latest" || echo "stable")) + if [ "${tag}" = "main" ]; then + tag=$(./tools/packaging/release/release.sh next-release-version) + tags=(${tag} "latest") + else + tags=(${tag}) + fi for tag in ${tags[@]}; do ./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \ $(pwd)/kata-static.tar.xz "docker.io/katadocker/kata-deploy" \ From 6915131adcc9f3a5473b78a461fd21aea55b3c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 15:36:08 +0100 Subject: [PATCH 06/13] release: Fix KATA_DEPLOY_{IMAGE_TAGS,REGISTRIES} declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we may end up with an unbound variable. Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 170664e800..1f30452bdb 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -15,8 +15,10 @@ set -o errtrace this_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" repo_root_dir="$(cd "$this_script_dir/../../../" && pwd)" -IFS=' ' read -a IMAGE_TAGS <<< "${KATA_DEPLOY_IMAGE_TAGS:-}" -IFS=' ' read -a REGISTRIES <<< "${KATA_DEPLOY_REGISTRIES:-}" +KATA_DEPLOY_IMAGE_TAGS="${KATA_DEPLOY_IMAGE_TAGS:-}" +IFS=' ' read -a IMAGE_TAGS <<< "${KATA_DEPLOY_IMAGE_TAGS}" +KATA_DEPLOY_REGISTRIES="${KATA_DEPLOY_REGISTRIES:-}" +IFS=' ' read -a REGISTRIES <<< "${KATA_DEPLOY_REGISTRIES}" GH_TOKEN="${GH_TOKEN:-}" ARCHITECTURE="${ARCHITECTURE:-}" KATA_STATIC_TARBALL="${KATA_STATIC_TARBALL:-}" From 397167836bb240d2689cc9d950aa21c2cddcdc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 15:39:47 +0100 Subject: [PATCH 07/13] release: Fix yq installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason we need to force its installation in the GOPATH, otherwise yq is not found. Ideally we should switch to a packaged version of yq, but that's a topic for another series. Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 1f30452bdb..799f8b25fe 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -166,11 +166,11 @@ function _upload_libseccomp_tarball() RELEASE_VERSION="$(_next_release_version)" - INSTALL_IN_GO_PATH=false ${repo_root_dir}/ci/install_yq.sh + GOPATH=${HOME}/go ./ci/install_yq.sh versions_yaml="versions.yaml" - version=$(/usr/local/bin/yq read ${versions_yaml} "externals.libseccomp.version") - repo_url=$(/usr/local/bin/yq read ${versions_yaml} "externals.libseccomp.url") + version=$(${HOME}/go/bin/yq read ${versions_yaml} "externals.libseccomp.version") + repo_url=$(${HOME}/go/bin/yq read ${versions_yaml} "externals.libseccomp.url") download_url="${repo_url}releases/download/v${version}" tarball="libseccomp-${version}.tar.gz" asc="${tarball}.asc" From aaf38aca9834fdf6efc72f8af56634733a60768a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 15:54:18 +0100 Subject: [PATCH 08/13] release: Fix typo in the _upload_libseccomp_tarball() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RELEASE_VERSIOB -> RELEASE_VERSION Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 799f8b25fe..52aa751d29 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -177,7 +177,7 @@ function _upload_libseccomp_tarball() curl -sSLO "${download_url}/${tarball}" curl -sSLO "${download_url}/${asc}" gh release upload "${RELEASE_VERSION}" "${tarball}" - gh release upload "${RELEASE_VERSIOB}" "${asc}" + gh release upload "${RELEASE_VERSION}" "${asc}" } function main() From 3db0630bc157c14edb0c15bbc806e3e6c1c1392a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 18:59:12 +0100 Subject: [PATCH 09/13] release: Add our own bits to the release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm getting here the most relevant parts of what we had as part of the release-notes.sh script. As the script will not be used anymore, it's been removed. Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release-notes.sh | 224 ----------------------- tools/packaging/release/release.sh | 81 +++++++- 2 files changed, 80 insertions(+), 225 deletions(-) delete mode 100755 tools/packaging/release/release-notes.sh diff --git a/tools/packaging/release/release-notes.sh b/tools/packaging/release/release-notes.sh deleted file mode 100755 index 078fd53980..0000000000 --- a/tools/packaging/release/release-notes.sh +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2018 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 -# - -[ -z "${DEBUG}" ] || set -x -set -o errexit -set -o nounset -set -o pipefail - -script_dir=$(dirname "$0") - -readonly script_name="$(basename "${BASH_SOURCE[0]}")" -readonly script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -readonly project="kata-containers" -readonly tmp_dir=$(mktemp -d -t release-notes-tmp.XXXXXXXXXX) - -# shellcheck source=../scripts/lib.sh -source "${script_dir}/../scripts/lib.sh" - -exit_handler() { - [ -d "${tmp_dir}" ] || rm -rf "${tmp_dir}" -} -trap exit_handler EXIT - -usage() { - return_code=${1:-} - cat < - -Args: - -previous-release: will be used as start point to get release notes -new-release: new release version that will have the - -Example: -./${script_name} 1.2.0 1.2.1 > notes.md - -EOF - exit "${return_code}" -} - -repos=( - "kata-containers" -) - -get_release_info() { - - docker_version=$(get_from_kata_deps "externals.docker.version") - crio_version=$(get_from_kata_deps "externals.crio.version") - containerd_version=$(get_from_kata_deps "externals.containerd.version") - kubernetes_version=$(get_from_kata_deps "externals.kubernetes.version") - oci_spec_version=$(get_from_kata_deps "specs.oci.version") - - libseccomp_version=$(get_from_kata_deps "externals.libseccomp.version") - libseccomp_url=$(get_from_kata_deps "externals.libseccomp.url") - - #Image information - image_info=$(get_from_kata_deps "assets.image") - - # Initrd information - initrd_info=$(get_from_kata_deps "assets.initrd") - - kernel_version=$(get_from_kata_deps "assets.kernel.version") - kernel_url=$(get_from_kata_deps "assets.kernel.url") - - kata_kernel_config_version="${new_release}-kernel-config" - kata_kernel_config_version="${new_release}-kernel-config" - - runtime_version=${new_release} -} - -changes() { - echo "**FIXME - message this section by hand to produce a summary please**" - - echo "### Shortlog" - - echo "
" - echo "Click the icon to show the list of commits included in this release" - - # XXX: Essential to have at least one blank line here. It forces - # GitHub to show each commit on a separate line. - echo - - for cr in $(git log --merges "${previous_release}".."${new_release}" | grep 'Merge:' | awk '{print $2".."$3}'); do - git log --oneline "$cr" - done - - echo "
" -} - -print_release_notes() { - cat <>/dev/null - - cat <>/dev/null - rm -rf "${tmp_dir}/${repo}" - done - - cat <> /tmp/our_notes_${RELEASE_VERSION} < Date: Tue, 27 Feb 2024 23:38:49 +0100 Subject: [PATCH 10/13] release: Fix typo in the arm arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason I'd changed arm64 to arm4 in a previous (already merged) commit. :-/ Signed-off-by: Fabiano Fidêncio --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 810b0a1bd9..7bb5253e28 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -121,7 +121,7 @@ jobs: ./tools/packaging/release/release.sh upload-kata-static-tarball env: GH_TOKEN: ${{ github.token }} - ARCHITECTURE: arm4 + ARCHITECTURE: arm64 - name: download-artifacts-s390x uses: actions/download-artifact@v3 From 22b19d0637bb1bad038aa7062eea13edf7cf295a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 27 Feb 2024 23:39:49 +0100 Subject: [PATCH 11/13] release: Add a step to get the release tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub actions is fun and always willing to play tricks with us. This nice little kid decided that `echo "FOO=\"bar zaz\"" >> $GITHUB_ENV` is not valid, and it simply breaks things in a way that is a pain to debug. But hey, we take this path, and after doing so I realised that the correct way to export that is `echo "FOO=bar zaz" >> $GITHUB_ENV`. I know, this looks incorrect, but this fellow never stops surprising us. Signed-off-by: Fabiano Fidêncio --- .github/workflows/release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7bb5253e28..b0e5305b89 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,11 +81,13 @@ jobs: username: ${{ secrets.QUAY_DEPLOYER_USERNAME }} password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }} + - name: Get the image tags + run: | + release_version=$(./tools/packaging/release/release.sh next-release-version) + echo "KATA_DEPLOY_IMAGE_TAGS=$release_version latest" >> "$GITHUB_ENV" + - name: Push multi-arch manifest run: | - tags="$(cat VERSION) latest" - echo "KATA_DEPLOY_IMAGE_TAGS=\"${tags}\"" >> "$GITHUB_ENV" - ./tools/packaging/release/release.sh publish-multiarch-manifest env: KATA_DEPLOY_REGISTRIES: "quay.io/kata-containers/kata-deploy docker.io/katadocker/kata-deploy" From 520cd90c43049559965e75139bc3950c21ce1f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 28 Feb 2024 10:41:45 +0100 Subject: [PATCH 12/13] release: Remove the "test-" from the release version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not needed anymore as we can run the tests from any branch, and we can patch this locally before doing a test. Signed-off-by: Fabiano Fidêncio --- tools/packaging/release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index b388027d89..019df075f0 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -83,7 +83,7 @@ function _next_release_version() esac next_release_number="${next_major}.${next_minor}.0" - echo "test-${next_release_number}" + echo "${next_release_number}" } function _update_version_file() From 068d80a9cba6af9e54b4d217f80f4b50ad1241eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 28 Feb 2024 00:08:47 +0100 Subject: [PATCH 13/13] docs: releases: Update link for the release actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows users to go directly to the action page whenever a release needs to be cut. Signed-off-by: Fabiano Fidêncio --- docs/Release-Process.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Release-Process.md b/docs/Release-Process.md index 3d9c34c3ac..53a89a1d67 100644 --- a/docs/Release-Process.md +++ b/docs/Release-Process.md @@ -10,8 +10,10 @@ This document lists the tasks required to create a Kata Release. ### Check GitHub Actions We make use of [GitHub actions](https://github.com/features/actions) in the -[minor](../.github/workflows/release-minor.yaml) and -[major](../.github/workflows/release-major.yaml) files from the +[minor](https://github.com/kata-containers/kata-containers/actions/workflows/release-minor.yaml) +and +[major](https://github.com/kata-containers/kata-containers/actions/workflows/release-major.yaml) +files from the `kata-containers/kata-containers` repository to build and upload release artifacts.