-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release scripts for version 7.63.x
Change-Id: Iced37a809df5bb8365d2d074397089d20ac1dcdb Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>
- Loading branch information
1 parent
910e5f4
commit 7c08494
Showing
10 changed files
with
290 additions
and
173 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.63.0-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.