chore: Fixes for post-release operator jobs (#1096)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>pull/1098/head
parent
6e72d0565f
commit
a7ee1e6d7e
|
|
@ -8,10 +8,6 @@ on:
|
|||
description: 'The version that is going to be released. Should be in format 7.y.z'
|
||||
required: true
|
||||
default: '7.y.z'
|
||||
dwoVersion:
|
||||
description: 'The version of DevWorkspace Operator used in the release. Should be in format v0.y.z'
|
||||
required: true
|
||||
default: 'v0.y.z'
|
||||
forceflag:
|
||||
description: 'To force creation of .x branch, use --force flag here'
|
||||
default: ''
|
||||
|
|
@ -51,21 +47,6 @@ jobs:
|
|||
chectlVersion="${{ github.event.inputs.version }}"
|
||||
fi
|
||||
|
||||
if [[ "${{ github.event.inputs.dwoVersion }}" == "" ]] || [[ "${{ github.event.inputs.dwoVersion }}" == "v0.y.z" ]]; then
|
||||
# TODO using a fixed version of latest DWO release, until new DWO release workflow will be implemented
|
||||
dwoVersion=v0.7.2
|
||||
|
||||
# the following block of code can be uncommented to automatically use the latest available version of DWO
|
||||
# versions=$(curl \
|
||||
# -H "Authorization: bearer ${GITHUB_TOKEN}" \
|
||||
# -X POST -H "Content-Type: application/json" --data \
|
||||
# '{"query": "{ repository(owner: \"devfile\", name: \"devworkspace-operator\") { refs(refPrefix: \"refs/tags/\", last: 2, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) { edges { node { name } } } } }" } ' \
|
||||
# https://api.github.com/graphql)
|
||||
# dwoVersion=$(echo "${versions[@]}" | jq '.data.repository.refs.edges[1].node.name | sub("\""; "")' | tr -d '"')
|
||||
else
|
||||
dwoVersion="${{ github.event.inputs.dwoVersion }}"
|
||||
fi
|
||||
|
||||
# generic method to call a GH action and pass in a single var=val parameter
|
||||
invokeAction() {
|
||||
this_repo=$1
|
||||
|
|
@ -95,4 +76,4 @@ jobs:
|
|||
}
|
||||
|
||||
# invoke action from chectl repo
|
||||
invokeAction che-incubator/chectl "Release - create pull request for upcoming release" "4008310" "main" "version=${chectlVersion},dwoVersion=${dwoVersion}"
|
||||
invokeAction che-incubator/chectl "Release - create pull request for upcoming release" "4008310" "main" "version=${chectlVersion}"
|
||||
|
|
|
|||
|
|
@ -52,3 +52,17 @@ jobs:
|
|||
export QUAY_USERNAME_OS=${{ secrets.QUAY_ECLIPSE_CHE_OPERATOR_OPENSHIFT_USERNAME }}
|
||||
export QUAY_PASSWORD_OS=${{ secrets.QUAY_ECLIPSE_CHE_OPERATOR_OPENSHIFT_PASSWORD }}
|
||||
./make-release.sh --prepare-community-operators-update ${{ github.event.inputs.forceflag }} -p ${{ github.event.inputs.platforms }}
|
||||
- name: Create failure MM message
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
echo "{\"text\":\":no_entry_sign: Che Community Operator ${{ github.event.inputs.version }} release has failed: https://github.com/eclipse-che/che-operator/actions/workflows/release-community-operator-PRs.yml\"}" > mattermost.json
|
||||
- name: Create success MM message
|
||||
run: |
|
||||
echo "{\"text\":\":white_check_mark: Che Community Operator ${{ github.event.inputs.version }} release PR have been created: Kubernetes -> https://github.com/k8s-operatorhub/community-operators/pulls ; Openshift -> https://github.com/redhat-openshift-ecosystem/community-operators-prod/pulls\"}" > 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
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ on:
|
|||
version:
|
||||
description: 'The version that is going to be released. Should be in format 7.yy.z'
|
||||
required: true
|
||||
dwoVersion:
|
||||
description: 'The version of DevWorkspace Controller. Should be in format v0.y.z'
|
||||
required: true
|
||||
forceRecreateTags:
|
||||
description: If true, tags will be recreated. Use with caution
|
||||
required: false
|
||||
|
|
@ -68,8 +65,6 @@ jobs:
|
|||
IMAGE_REGISTRY_USER_NAME: eclipse
|
||||
run: |
|
||||
CHE_VERSION=${{ github.event.inputs.version }}
|
||||
DWO_VERSION=${{ github.event.inputs.dwoVersion }}
|
||||
if [[ ${DWO_VERSION} != "v"* ]]; then DWO_VERSION="v${DWO_VERSION}"; fi
|
||||
echo "CHE_VERSION=${CHE_VERSION}"
|
||||
BRANCH=${CHE_VERSION%.*}.x
|
||||
echo "BRANCH=${BRANCH}"
|
||||
|
|
@ -88,10 +83,10 @@ jobs:
|
|||
export QUAY_ECLIPSE_CHE_PASSWORD=${{ secrets.QUAY_PASSWORD }}
|
||||
|
||||
if [[ ${CHE_VERSION} == *".0" ]]; then
|
||||
./make-release.sh ${CHE_VERSION} --release --check-resources --release-olm-files --dev-workspace-controller-version ${DWO_VERSION}
|
||||
./make-release.sh ${CHE_VERSION} --release --check-resources --release-olm-files
|
||||
else
|
||||
git checkout ${BRANCH}
|
||||
./make-release.sh ${CHE_VERSION} --release --release-olm-files --dev-workspace-controller-version ${DWO_VERSION}
|
||||
./make-release.sh ${CHE_VERSION} --release --release-olm-files
|
||||
fi
|
||||
|
||||
# default robot account on quay does not have permissions for application repos
|
||||
|
|
|
|||
Loading…
Reference in New Issue