From 9e652df03a24e18c6787beee30a2e8a88e64c7d8 Mon Sep 17 00:00:00 2001 From: Dmytro Nochevnov Date: Mon, 10 Apr 2023 20:06:10 +0300 Subject: [PATCH 1/2] Add release scripts for version 7.74.x Change-Id: Iced37a809df5bb8365d2d074397089d20ac1dcdb Signed-off-by: Dmytro Nochevnov --- .github/workflows/build.yml | 140 ------------------------------ .github/workflows/make-branch.yml | 31 ------- .github/workflows/next-build.yaml | 48 ++++++++++ .github/workflows/release.yml | 91 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 3 + VERSION | 1 + build/dockerfiles/README.md | 7 ++ cmd/configbump/main.go | 2 +- make-release.sh | 138 +++++++++++++++++++++++++++++ 10 files changed, 290 insertions(+), 173 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/make-branch.yml create mode 100644 .github/workflows/next-build.yaml create mode 100644 .github/workflows/release.yml create mode 100644 RELEASE.md create mode 100644 VERSION create mode 100644 build/dockerfiles/README.md create mode 100644 make-release.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 6fb6ea9..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,140 +0,0 @@ -# -# Copyright (c) 2020-2023 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation -# - -name: build - -on: - push: - branches: - - 'master' - - 'v*' - tags: - - 'v*' - paths-ignore: - - '**.md' - pull_request: - branches: - - 'master' - - 'v*' - paths-ignore: - - '**.md' - -jobs: - - go: - runs-on: ubuntu-22.04 - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Prepare - id: prepare - run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then - echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - fi - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.13 - - - name: Cache Go modules - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Go mod - run: go mod download - - - name: Go test - run: go test -v ./... - docker: - runs-on: ubuntu-22.04 - needs: go - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Prepare - id: prepare - run: | - DOCKERHUB_USERNAME=${{secrets.DOCKERHUB_USERNAME}} - DOCKER_IMAGE=${{secrets.DOCKER_IMAGE}} - DOCKER_IMAGE=${DOCKER_IMAGE:-$GITHUB_REPOSITORY} - DOCKER_REPO=${{secrets.DOCKER_REPO}} - DOCKER_PLATFORMS=linux/amd64,linux/s390x,linux/arm64,linux/ppc64le - VERSION=latest - - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/v} - fi - - TAGS="--tag ${DOCKER_IMAGE}:${VERSION}" - TAGS_RHEL="--tag ${DOCKER_IMAGE}:${VERSION}-rhel" - - echo "DOCKERHUB_USERNAME=${DOCKERHUB_USERNAME}" >> $GITHUB_OUTPUT - echo "docker_repo=${DOCKER_REPO}" >> $GITHUB_OUTPUT - echo "docker_image=${DOCKER_IMAGE}" >> $GITHUB_OUTPUT - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "buildx_args=--platform ${DOCKER_PLATFORMS} \ - --build-arg VERSION=${VERSION} \ - --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ - --build-arg VCS_REF=${GITHUB_SHA::8} \ - ${TAGS} --file build/dockerfiles/Dockerfile ." >> $GITHUB_OUTPUT - - echo "buildx_args_rhel=--platform linux/amd64 \ - --build-arg VERSION=${VERSION} \ - --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ - --build-arg VCS_REF=${GITHUB_SHA::8} \ - ${TAGS_RHEL} --file build/dockerfiles/rhel.Dockerfile ." >> $GITHUB_OUTPUT - - - name: Set up Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v3.2.0 - with: - buildx-version: v0.4.1 - - - name: Docker Buildx (build) - run: | - docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} - - - name: Docker Login - if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) - env: - DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - run: | - echo "${DOCKERHUB_PASSWORD}" | docker login ${{ steps.prepare.outputs.docker_repo }} --username "${{ steps.prepare.outputs.DOCKERHUB_USERNAME }}" --password-stdin - - - name: Docker Buildx (push) - if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) - run: | - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} - - - name: Docker Buildx rhel (push) - if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) - run: | - docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args_rhel }} - - - name: Docker Check Manifest - if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) - run: | - docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} - - - name: Clear - if: always() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) - run: | - rm -f ${HOME}/.docker/config.json diff --git a/.github/workflows/make-branch.yml b/.github/workflows/make-branch.yml deleted file mode 100644 index ceb9258..0000000 --- a/.github/workflows/make-branch.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Create branch -on: - # to be run once every 3 weeks for a 7.yy.0 release, so we can get a stable 7.yy.x branch for use by downstream consumers - workflow_dispatch: - inputs: - branch: - description: 'The branch to create. Should be in format 7.yy.x' - required: true - branchfrom: - description: 'The source branch from which to branch, eg., main' - default: 'main' - forceflag: - description: 'To force creation of .x branch, use --force flag here' - default: '' -jobs: - build: - name: Create branch - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Create branch - run: | - git config --global user.name "Mykhailo Kuznietsov" - git config --global user.email "mkuznets@redhat.com" - curl https://raw.githubusercontent.com/eclipse-che/che-release/main/make-branch.sh | bash -s -- \ - --branch ${{ github.event.inputs.branch }} \ - --branchfrom ${{ github.event.inputs.branchfrom }} \ - --repo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \ - ${{ github.event.inputs.forceflag }} diff --git a/.github/workflows/next-build.yaml b/.github/workflows/next-build.yaml new file mode 100644 index 0000000..8c416a9 --- /dev/null +++ b/.github/workflows/next-build.yaml @@ -0,0 +1,48 @@ +# +# Copyright (c) 2019-2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +name: Configbump Next Build + +on: + workflow_dispatch: + inputs: + push: + branches: [ main ] +jobs: + build-push: + runs-on: ubuntu-22.04 + steps: + - name: Checkout configmump source code + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to quay.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + registry: quay.io + - id: vars + shell: bash + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Build and push both short SHA tag and next tag + uses: docker/build-push-action@v3 + with: + file: build/dockerfiles/Dockerfile + platforms: linux/amd64,linux/ppc64le,linux/arm64 + push: true + tags: | + quay.io/che-incubator/configbump:next + quay.io/che-incubator/configbump:${{ steps.vars.outputs.sha_short }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8d33cc2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,91 @@ +# +# Copyright (c) 2019-2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +name: Release Che Configbump + +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + version: + description: 'The version that is going to be released. Should be in format 7.y.z' + required: true + noCommit: + description: 'If true, will not commit the version bump changes' + default: '' + forceRecreateTags: + description: If true, tags will be recreated. Use with caution + required: false + default: 'false' +jobs: + build: + name: Create Release + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check existing tags + run: | + set +e + RECREATE_TAGS=${{ github.event.inputs.forceRecreateTags }} + VERSION=${{ github.event.inputs.version }} + EXISTING_TAG=$(git ls-remote --exit-code origin refs/tags/${VERSION}) + if [[ -n ${EXISTING_TAG} ]]; then + if [[ ${RECREATE_TAGS} == "true" ]]; then + echo "[INFO] Removing tag for ${VERSION} version. New tag will be recreated during release." + git push origin :$VERSION + else + echo "[ERROR] Cannot proceed with release - tag ${EXISTING_TAG} already exists." + exit 1 + fi + else + echo "[INFO] No existing tags detected for $VERSION" + fi + - name: Login to quay.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + registry: quay.io + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Create Release + run: | + git config --global user.name "Mykhailo Kuznietsov" + git config --global user.email "mkuznets@redhat.com" + git config --global pull.rebase true + export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }} + NO_COMMIT=${{ github.event.inputs.noCommit}} + if [[ $NO_COMMIT == "true" ]]; then + NO_COMMIT="--no-commit" + else + NO_COMMIT= + fi + /bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release $NO_COMMIT + - name: Create failure MM message + if: ${{ failure() }} + run: | + echo "{\"text\":\":no_entry_sign: Che Configbump ${{ github.event.inputs.version }} release has failed: https://github.com/che-incubator/configbump/actions/workflows/release.yml\"}" > mattermost.json + - name: Create success MM message + run: | + echo "{\"text\":\":white_check_mark: Che Configbump ${{ github.event.inputs.version }} has been released: quay.io/che-incubator/configbump:${{ github.event.inputs.version }}\"}" > mattermost.json + - name: Send MM message + if: ${{ success() }} || ${{ failure() }} + uses: mattermost/action-mattermost-notify@1.1.0 + env: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + MATTERMOST_CHANNEL: eclipse-che-releases + MATTERMOST_USERNAME: che-bot diff --git a/README.md b/README.md index debcbcf..287650e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ We originally wrote a prototype of this tool in Rust (https://github.com/metlos/ ``` $ ./configbump --help -config-bump 0.1.0 +config-bump 7.63.0-SNAPSHOT Usage: configbump --dir DIR --labels LABELS [--namespace NAMESPACE] Options: diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..a50bd3d --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +# Eclipse Che Configbump release process + +Use "Release Che Configbump" workflow for release, which can be triggered manually on GitHub page of the repository at Actions -> "Release Che Configbump" -> "Run workflow" diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..97e89f6 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +7.63.0-SNAPSHOT diff --git a/build/dockerfiles/README.md b/build/dockerfiles/README.md new file mode 100644 index 0000000..6a087df --- /dev/null +++ b/build/dockerfiles/README.md @@ -0,0 +1,7 @@ +# Dockerfile Clarification + +**Dockerfile** is the Eclipse Che build file, used in this repo to publish to [quay.io/che-incubator/configbump](https://quay.io/repository/che-incubator/configbump?tab=tags). + +**rhel.Dockerfile** is the build file for the [Red Hat OpenShift Devspaces](https://github.com/redhat-developer/devspaces-images/tree/devspaces-3-rhel-8/devspaces-configbump) image, which can be run locally. + +**brew.Dockerfile** is a variation on `rhel.Dockerfile` specifically for Red Hat builds, and cannot be run locally as is. \ No newline at end of file diff --git a/cmd/configbump/main.go b/cmd/configbump/main.go index bcdecf0..c6d2bd0 100644 --- a/cmd/configbump/main.go +++ b/cmd/configbump/main.go @@ -35,7 +35,7 @@ type opts struct { // Version returns the version of the program func (opts) Version() string { - return "config-bump 0.1.0" + return "config-bump 7.63.0-SNAPSHOT" } const controllerName = "config-bump" diff --git a/make-release.sh b/make-release.sh new file mode 100644 index 0000000..86dbc61 --- /dev/null +++ b/make-release.sh @@ -0,0 +1,138 @@ +#!/bin/bash +# +# Copyright (c) 2019-2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# Release process automation script. +# Used to create branch/tag, update VERSION files +# and and trigger release by force pushing changes to the release branch + +# set to 1 to actually trigger changes in the release branch +TRIGGER_RELEASE=0 +NOCOMMIT=0 + +REGISTRY="quay.io" +DOCKERFILE="build/dockerfiles/Dockerfile" +ORGANIZATION="che-incubator" +IMAGE="configbump" + +while [[ "$#" -gt 0 ]]; do + case $1 in + '-t'|'--trigger-release') TRIGGER_RELEASE=1; shift 0;; + '-v'|'--version') VERSION="$2"; shift 1;; + '-n'|'--no-commit') NOCOMMIT=1; shift 0;; + esac + shift 1 +done + +usage () +{ + echo "Usage: $0 --version [VERSION TO RELEASE] [--trigger-release]" + echo "Example: $0 --version 7.7.0 --trigger-release"; echo +} + +if [[ ! ${VERSION} ]]; then + usage + exit 1 +fi + +releaseMachineExec() { + # docker buildx includes automated push to registry, so build using tag we want published, not just local ${IMAGE} + docker buildx build \ + --tag "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${VERSION}" \ + --push \ + --provenance=false \ + -f ./${DOCKERFILE} . --platform "linux/amd64,linux/ppc64le,linux/arm64" | cat + echo "Pushed ${REGISTRY}/${ORGANIZATION}/${IMAGE}:${VERSION}" +} + +# derive branch from version +BRANCH=${VERSION%.*}.x + +# if doing a .0 release, use main; if doing a .z release, use $BRANCH +if [[ ${VERSION} == *".0" ]]; then + BASEBRANCH="main" +else + BASEBRANCH="${BRANCH}" +fi + +# create new branch off ${BASEBRANCH} (or check out latest commits if branch already exists), then push to origin +if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then + git branch "${BRANCH}" || git checkout "${BRANCH}" && git pull origin "${BRANCH}" + git push origin "${BRANCH}" + git fetch origin "${BRANCH}:${BRANCH}" || true + git checkout "${BRANCH}" +else + git fetch origin "${BRANCH}:${BRANCH}" || true + git checkout ${BRANCH} +fi +set -e + +# change VERSION file +echo "${VERSION}" > VERSION + +# commit change into branch +if [[ ${NOCOMMIT} -eq 0 ]]; then + COMMIT_MSG="chore: release: bump to ${VERSION} in ${BRANCH}" + git commit -s -m "${COMMIT_MSG}" VERSION + git pull origin "${BRANCH}" + git push origin "${BRANCH}" +fi + +if [[ $TRIGGER_RELEASE -eq 1 ]]; then + # push new branch to release branch to trigger CI build + releaseConfigbump + + # tag the release + git checkout "${BRANCH}" + git tag "${VERSION}" + git push origin "${VERSION}" +fi + +# now update ${BASEBRANCH} to the new snapshot version +git fetch origin "${BASEBRANCH}":"${BASEBRANCH}" || true +git checkout "${BASEBRANCH}" + +# change VERSION file + commit change into ${BASEBRANCH} branch +if [[ "${BASEBRANCH}" != "${BRANCH}" ]]; then + # bump the y digit + [[ $BRANCH =~ ^([0-9]+)\.([0-9]+)\.x ]] && BASE=${BASH_REMATCH[1]}; NEXT=${BASH_REMATCH[2]}; (( NEXT=NEXT+1 )) # for BRANCH=7.10.x, get BASE=7, NEXT=11 + NEXTVERSION="${BASE}.${NEXT}.0-SNAPSHOT" +else + # bump the z digit + [[ $VERSION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]] && BASE="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"; NEXT="${BASH_REMATCH[3]}"; (( NEXT=NEXT+1 )) # for VERSION=7.7.1, get BASE=7.7, NEXT=2 + NEXTVERSION="${BASE}.${NEXT}-SNAPSHOT" +fi + +# change VERSION file +echo "${NEXTVERSION}" > VERSION +if [[ ${NOCOMMIT} -eq 0 ]]; then + BRANCH=${BASEBRANCH} + # commit change into branch + COMMIT_MSG="chore: release: bump to ${NEXTVERSION} in ${BRANCH}" + git commit -s -m "${COMMIT_MSG}" VERSION + git pull origin "${BRANCH}" + + PUSH_TRY="$(git push origin "${BRANCH}")" + # shellcheck disable=SC2181 + if [[ $? -gt 0 ]] || [[ $PUSH_TRY == *"protected branch hook declined"* ]]; then + PR_BRANCH=pr-main-to-${NEXTVERSION} + # create pull request for main branch, as branch is restricted + git branch "${PR_BRANCH}" + git checkout "${PR_BRANCH}" + git pull origin "${PR_BRANCH}" + git push origin "${PR_BRANCH}" + lastCommitComment="$(git log -1 --pretty=%B)" + hub pull-request -f -m "${lastCommitComment} + +${lastCommitComment}" -b "${BRANCH}" -h "${PR_BRANCH}" + fi +fi From ac95b4735ad4902f5fc4e8b745c388b9e295b0ca Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Sat, 16 Sep 2023 09:41:49 -0300 Subject: [PATCH 2/2] Bump to 7.75; update copyrights and other files. Update .github/workflows/next-build.yaml Co-authored-by: Mykhailo Kuznietsov Update .github/workflows/next-build.yaml Update .github/workflows/release.yml Update .github/workflows/next-build.yaml Update RELEASE.md Update VERSION Update cmd/configbump/main.go Update make-release.sh Update make-release.sh Change-Id: Ibfc50597e4c6a50b34e3d3f586e8f8df20feaa57 disable mattermost messaging; use correct secret for GH token Change-Id: Ie3a950ecfa5faa201a3ca3a859e4a4e6655ca273 Signed-off-by: Nick Boldt bump to 7.75 Change-Id: I20d1b8410d8867fd669232665cdd226efe44abdc Signed-off-by: Nick Boldt fix chmod Change-Id: If80af908352592c3f7d9e5e8e849bb11fe5643dc Signed-off-by: Nick Boldt --- .github/workflows/next-build.yaml | 6 +++--- .github/workflows/release.yml | 32 +++++++++++++++---------------- README.md | 2 +- RELEASE.md | 2 ++ VERSION | 2 +- cmd/configbump/main.go | 2 +- make-release.sh | 6 +++--- 7 files changed, 27 insertions(+), 25 deletions(-) mode change 100644 => 100755 make-release.sh diff --git a/.github/workflows/next-build.yaml b/.github/workflows/next-build.yaml index 8c416a9..cdc0b90 100644 --- a/.github/workflows/next-build.yaml +++ b/.github/workflows/next-build.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2023 Red Hat, Inc. +# Copyright (c) 2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -36,12 +36,12 @@ jobs: - id: vars shell: bash run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Build and push both short SHA tag and next tag uses: docker/build-push-action@v3 with: file: build/dockerfiles/Dockerfile - platforms: linux/amd64,linux/ppc64le,linux/arm64 + platforms: linux/amd64,linux/arm64 push: true tags: | quay.io/che-incubator/configbump:next diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d33cc2..772d8a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2023 Red Hat, Inc. +# Copyright (c) 2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -67,7 +67,7 @@ jobs: git config --global user.name "Mykhailo Kuznietsov" git config --global user.email "mkuznets@redhat.com" git config --global pull.rebase true - export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }} + export GITHUB_TOKEN=${{ secrets.CHE_INCUBATOR_BOT_GITHUB_TOKEN }} NO_COMMIT=${{ github.event.inputs.noCommit}} if [[ $NO_COMMIT == "true" ]]; then NO_COMMIT="--no-commit" @@ -75,17 +75,17 @@ jobs: NO_COMMIT= fi /bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release $NO_COMMIT - - name: Create failure MM message - if: ${{ failure() }} - run: | - echo "{\"text\":\":no_entry_sign: Che Configbump ${{ github.event.inputs.version }} release has failed: https://github.com/che-incubator/configbump/actions/workflows/release.yml\"}" > mattermost.json - - name: Create success MM message - run: | - echo "{\"text\":\":white_check_mark: Che Configbump ${{ github.event.inputs.version }} has been released: quay.io/che-incubator/configbump:${{ github.event.inputs.version }}\"}" > mattermost.json - - name: Send MM message - if: ${{ success() }} || ${{ failure() }} - uses: mattermost/action-mattermost-notify@1.1.0 - env: - MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} - MATTERMOST_CHANNEL: eclipse-che-releases - MATTERMOST_USERNAME: che-bot + # - name: Create failure MM message + # if: ${{ failure() }} + # run: | + # echo "{\"text\":\":no_entry_sign: Che Configbump ${{ github.event.inputs.version }} release has failed: https://github.com/che-incubator/configbump/actions/workflows/release.yml\"}" > mattermost.json + # - name: Create success MM message + # run: | + # echo "{\"text\":\":white_check_mark: Che Configbump ${{ github.event.inputs.version }} has been released: quay.io/che-incubator/configbump:${{ github.event.inputs.version }}\"}" > mattermost.json + # - name: Send MM message + # if: ${{ success() }} || ${{ failure() }} + # uses: mattermost/action-mattermost-notify@1.1.0 + # env: + # MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + # MATTERMOST_CHANNEL: eclipse-che-releases + # MATTERMOST_USERNAME: che-bot diff --git a/README.md b/README.md index 287650e..c15777b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ We originally wrote a prototype of this tool in Rust (https://github.com/metlos/ ``` $ ./configbump --help -config-bump 7.63.0-SNAPSHOT +config-bump 7.75.0-SNAPSHOT Usage: configbump --dir DIR --labels LABELS [--namespace NAMESPACE] Options: diff --git a/RELEASE.md b/RELEASE.md index a50bd3d..de40bab 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,5 @@ # Eclipse Che Configbump release process Use "Release Che Configbump" workflow for release, which can be triggered manually on GitHub page of the repository at Actions -> "Release Che Configbump" -> "Run workflow" + +Normally this workflow will be triggered as part of a Che release - see https://github.com/eclipse-che/che-release/actions/workflows/release-orchestrate-overall.yml diff --git a/VERSION b/VERSION index 97e89f6..cf55e06 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.63.0-SNAPSHOT +7.75.0-SNAPSHOT diff --git a/cmd/configbump/main.go b/cmd/configbump/main.go index c6d2bd0..06ba56d 100644 --- a/cmd/configbump/main.go +++ b/cmd/configbump/main.go @@ -35,7 +35,7 @@ type opts struct { // Version returns the version of the program func (opts) Version() string { - return "config-bump 7.63.0-SNAPSHOT" + return "config-bump 7.75.0-SNAPSHOT" } const controllerName = "config-bump" diff --git a/make-release.sh b/make-release.sh old mode 100644 new mode 100755 index 86dbc61..c528d77 --- a/make-release.sh +++ b/make-release.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2019-2023 Red Hat, Inc. +# Copyright (c) 2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -36,7 +36,7 @@ done usage () { echo "Usage: $0 --version [VERSION TO RELEASE] [--trigger-release]" - echo "Example: $0 --version 7.7.0 --trigger-release"; echo + echo "Example: $0 --version 7.75.0 --trigger-release"; echo } if [[ ! ${VERSION} ]]; then @@ -50,7 +50,7 @@ releaseMachineExec() { --tag "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${VERSION}" \ --push \ --provenance=false \ - -f ./${DOCKERFILE} . --platform "linux/amd64,linux/ppc64le,linux/arm64" | cat + -f ./${DOCKERFILE} . --platform "linux/amd64,linux/arm64" | cat echo "Pushed ${REGISTRY}/${ORGANIZATION}/${IMAGE}:${VERSION}" }