Release workflows refactoring (#733)

Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
pull/738/head
Mykhailo Kuznietsov 2021-03-26 11:49:27 +02:00 committed by GitHub
parent 8e99287eec
commit 8724853a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 5 deletions

View File

@ -16,7 +16,7 @@ on:
branches:
- master
paths:
- 'deploy/olm-catalog/stable/eclipse-che-preview-*/manifests/che-operator.clusterserviceversion.yaml'
- 'VERSION'
jobs:
build:

View File

@ -16,7 +16,7 @@ on:
branches:
- master
paths:
- 'deploy/olm-catalog/stable/eclipse-che-preview-*/manifests/che-operator.clusterserviceversion.yaml'
- 'VERSION'
jobs:
build:

View File

@ -12,7 +12,7 @@ on:
branches:
- master
paths:
- 'deploy/olm-catalog/stable/eclipse-che-preview-*/manifests/che-operator.clusterserviceversion.yaml'
- 'VERSION'
jobs:
build:

View File

@ -93,10 +93,15 @@ jobs:
git checkout ${BRANCH}
git checkout ${CHE_VERSION}-release
./make-release.sh ${CHE_VERSION} --push-git-changes --pull-requests ${{ github.event.inputs.force_update }}
- name: Create MM message
- name: Create failure MM message
if: ${{ failure() }}
run: |
echo "{\"text\":\":building_construction: Che Operator ${{ github.event.inputs.version }} has been released: https://quay.io/eclipse/che-operator:${{ github.event.inputs.version }}\"}" > mattermost.json
echo "{\"text\":\":building_construction: Che Operator ${{ github.event.inputs.version }} release has failed: https://github.com/eclipse-che/che-operator/actions/workflows/release.yml\"}" > mattermost.json
- name: Create success MM message
run: |
echo "{\"text\":\":building_construction: Che Operator ${{ github.event.inputs.version }} release PR have been created: https://github.com/eclipse-che/che-operator/pulls/che-bot\"}" > mattermost.json
- name: Send MM message
if: ${{ success() }} || ${{ failure() }}
uses: mattermost/action-mattermost-notify@master
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}

1
VERSION Normal file
View File

@ -0,0 +1 @@
7.27.2

View File

@ -181,6 +181,13 @@ updateNightlyOlmFiles() {
fi
}
updateVersionFile() {
echo "[INFO] updating VERSION file"
echo ${RELEASE} > VERSION
git add VERSION
git commit -m "Update VERSION to $RELEASE" --signoff
}
releaseOlmFiles() {
echo "[INFO] releaseOlmFiles :: Release OLM files"
echo "[INFO] releaseOlmFiles :: Launch 'olm/release-olm-files.sh' script"
@ -257,6 +264,7 @@ prepareCommunityOperatorsUpdate() {
}
run() {
checkoutToReleaseBranch
updateVersionFile
releaseOperatorCode
if [[ $UPDATE_NIGHTLY_OLM_FILES == "true" ]]; then
updateNightlyOlmFiles