Skip to content

Commit 69d9acb

Browse files
authored
chore: switch from configbump as a branch creation step to a release step; fix inconsistent ordering in make-release.sh; update readme for new phase order; simplify redundant text (#80)
* switch from configbump as a branch creation step to a release step; fix inconsistent ordering in make-release.sh Change-Id: I9a2de4176d1579577dc057449d2d44c7fd6b6f98 Signed-off-by: Nick Boldt <nboldt@redhat.com> * update readme for new phase order; simplify redundant text Change-Id: I3c328d21aee05f49667aada35d4bc02f470e2992 Signed-off-by: Nick Boldt <nboldt@redhat.com> * set workflowId = 69757177 Change-Id: I97aa59d9ba1247ec920a955623c261cbc4ee0f45 Signed-off-by: Nick Boldt <nboldt@redhat.com> --------- Signed-off-by: Nick Boldt <nboldt@redhat.com>
1 parent 54cf84f commit 69d9acb

File tree

5 files changed

+88
-77
lines changed

5 files changed

+88
-77
lines changed

README.md

+25-39
Original file line numberDiff line numberDiff line change
@@ -25,57 +25,43 @@ Most of the projects that are part of the weekly release cycle are also united i
2525

2626
With the exception of some projects, it allows to perform the bulk of the release process with 1 click, running following projects in the correct order, making them complete a full release process - pushing commits or pull request to respective repositories, deploying artifacts etc.
2727

28-
The projects that are covered by this workflow release container images:
28+
The projects that are covered by this workflow release container images versioned 7.yy.0 every sprint, split into 4 phases:
29+
30+
**Phase 1**
2931

30-
- [che-e2e](https://github.com/eclipse/che) - https://quay.io/eclipse/che-e2e
3132
- [che-code](https://github.com/che-incubator/che-code) - https://quay.io/che-incubator/che-code
33+
- [configbump](https://github.com/che-incubator/configbump) - https://quay.io/che-incubator/configbump
3234
- [che-machine-exec](https://github.com/eclipse-che/che-machine-exec) - https://quay.io/eclipse/che-machine-exec
33-
- [che-devfile-registry](https://github.com/eclipse-che/che-devfile-registry) - https://quay.io/eclipse/che-devfile-registry
35+
- [che server](https://github.com/eclipse-che/che-server) - https://quay.io/eclipse/che-server
36+
37+
**Phase 2**
38+
39+
- [che-e2e](https://github.com/eclipse/che) - https://quay.io/eclipse/che-e2e
3440
- [che-plugin-registry](https://github.com/eclipse-che/che-plugin-registry) - https://quay.io/eclipse/che-plugin-registry
3541
- [che-dashboard](https://github.com/eclipse-che/che-dashboard) - https://quay.io/eclipse/che-dashboard
36-
- [che-operator](https://github.com/eclipse-che/che-operator) - https://quay.io/eclipse/che-operator.
37-
- [che server](https://github.com/eclipse-che/che-server) -
38-
- https://quay.io/eclipse/che-endpoint-watcher,
39-
- https://quay.io/eclipse/che-keycloak,
40-
- https://quay.io/eclipse/che-postgres,
41-
- https://quay.io/eclipse/che-server
42-
43-
Additionally, these slower-moving projects perform branch creation every sprint:
44-
- [configbump](https://github.com/che-incubator/configbump)
42+
43+
**Phase 3**
44+
45+
- [che-devfile-registry](https://github.com/eclipse-che/che-devfile-registry) - https://quay.io/eclipse/che-devfile-registry
46+
47+
**Phase 4**
48+
49+
- [che-operator](https://github.com/eclipse-che/che-operator) - https://quay.io/eclipse/che-operator
50+
51+
As part of the first phase, [che-devfile-registry](https://github.com/eclipse-che/che-devfile-registry) also publishes the [devworkspace-generator](https://github.com/eclipse-che/che-devfile-registry/tree/main/tools/devworkspace-generator) to https://www.npmjs.com/package/@eclipse-che/che-devworkspace-generator
52+
53+
This slow-moving project performs branch creation every sprint (but does not release a 7.yy.0 every sprint):
4554
- [kubernetes-image-puller](https://github.com/che-incubator/kubernetes-image-puller)
4655

56+
4757
Che Operator requires manual verifications by Deploy team (and also various tests run against running Che, so we have a chance to see if it functions). When everything has been verified, after the merging of operator PRs the following projects workflows will be triggered automatically.
4858
- [chectl](https://github.com/che-incubator/chectl) - release artifact is a set of binaries, published to [Releases page]https://github.com/che-incubator/chectl/releases
4959
- [che-docs](https://github.com/eclipse/che-docs) - only create tag and pull request to update to latest released version of Che
5060
- [community-operator](https://github.com/operator-framework/community-operators/) - [create pull requests](https://github.com/operator-framework/community-operators/pulls?q=%22Update+eclipse-che+operator%22+is%3Aopen) to update to latest released version of Che in OperatorHub
5161

5262
## Release phases
5363

54-
At the moment, [Release - Orchestrate Overall Release Phases]((https://github.com/eclipse-che/che-release/actions?query=workflow%3A%22Release+-+Orchestrate+Overall+Release+Phases%22)) job has the way of ordering the release by utilizing the concept of phases.
55-
Currently there are several phases, representing an order of projects, which we can execute in parallel, as long as their dependent projects have been released. Projects in lower phases are those, on which projects from higher phase will depend.
56-
57-
* Phase 1:
58-
* [che-code](https://github.com/che-incubator/che-code),
59-
* [che-machine-exec](https://github.com/eclipse-che/che-machine-exec),
60-
* [che-server](https://github.com/eclipse-che/che-server);
61-
* [devworkspace-generator](https://github.com/eclipse-che/che-devfile-registry/tree/main/tools/devworkspace-generator)
62-
* then creation of branches for:
63-
* [configbump](https://github.com/che-incubator/configbump),
64-
* [kubernetes-image-puller](https://github.com/che-incubator/kubernetes-image-puller)
65-
66-
* Phase 2:
67-
* [che-e2e](https://github.com/eclipse/che) - depends on devworkspace-generator, che-server (typescript dto)
68-
* [che-plugin-registry](https://github.com/eclipse-che/che-plugin-registry) - depends on che-machine-exec
69-
* [che-dashboard](https://github.com/eclipse-che/che-dashboard) - depends on devworkspace-generator
70-
71-
* Phase 3:
72-
* [che-devfile-registry](https://github.com/eclipse-che/che-devfile-registry) - depends on plugin-registry, devworkspace-generator
73-
74-
* Phase 4:
75-
* [che-operator](https://github.com/eclipse-che/che-operator) - depends on phases 1 to 3 and performs several e2e validation tests
76-
77-
The phases list is a comma-separated list (default, which includes all phases "1,2,3,4"). Removing certain phases is useful, when you rerun the orchestration job, and certain projects shouldn't be released again.
78-
Note that this approach will change, once a new system will be implemented, where we can more clearly specify dependencies between workflows, using special types of GitHub action.
64+
The [Release - Orchestrate Overall Release Phases]((https://github.com/eclipse-che/che-release/actions?query=workflow%3A%22Release+-+Orchestrate+Overall+Release+Phases%22)) action runs [make-release.sh](https://github.com/eclipse-che/che-release/blob/main/make-release.sh) to release the various Che containers and packages in the correct order. This ensures that dependencies between containers or packages can be met. See [make-release.sh](https://github.com/eclipse-che/che-release/blob/main/make-release.sh) for these dependencies. The list of phases is above.
7965

8066

8167
## Release procedure
@@ -102,6 +88,6 @@ Note that this approach will change, once a new system will be implemented, wher
10288
--------------
10389

10490

105-
# Che release gotchas
91+
# Che release known issues
10692

107-
* https://github.com/eclipse/che/issues/17178 - Changelog generation contains too much information
93+
None at this time.

make-branch.sh

100644100755
File mode changed.

make-release.sh

+60-36
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@ usage ()
1414
echo "Usage: $0 --version [CHE VERSION TO RELEASE] --parent-version [CHE PARENT VERSION] --phases [LIST OF PHASES]
1515
1616
# Comma-separated phases to perform.
17-
#1: Code, MachineExec, Server, devworkspace-generator, createBranches;
17+
#1: Code, Configbump, MachineExec, Server, devworkspace-generator, createBranches (kubernetes-image-puller);
1818
#2: E2E, PluginRegistry, Dashboard;
1919
#3: DevfileRegistry;
2020
#4: Operator;
2121
# Default: 1,2,3,4
2222
# Omit phases that have successfully run.
2323
"
24-
echo "Example: $0 --version 7.29.0 --phases 1,2,3,4"; echo
24+
echo "Example: $0 --version 7.75.0 --phases 1,2,3,4"; echo
2525
exit 1
2626
}
2727

28+
#################### SETUP ####################
29+
2830
checkForBlockerIssues()
2931
{
3032
# check for blockers only if doing a 7.yy.0 release
@@ -56,6 +58,22 @@ checkForBlockerIssues()
5658
fi
5759
}
5860

61+
setupGitconfig() {
62+
ne else?
63+
git config --global user.name "Mykhailo Kuznietsov"
64+
git config --global user.email mkuznets@redhat.com
65+
66+
# hub CLI configuration
67+
git config --global push.default matching
68+
69+
# suppress warnings about how to reconcile divergent branches
70+
git config --global pull.ff only
71+
72+
# NOTE when invoking action from che-incubator/* repos (not eclipse/che* repos), must use CHE_INCUBATOR_BOT_GITHUB_TOKEN
73+
# default to CHE_BOT GH token
74+
export GITHUB_TOKEN="${CHE_BOT_GITHUB_TOKEN}"
75+
}
76+
5977
evaluateCheVariables() {
6078
echo "Che version: ${CHE_VERSION}"
6179
# derive branch from version
@@ -81,61 +99,56 @@ evaluateCheVariables() {
8199
echo "Release Process Phases: '${PHASES}'"
82100
}
83101

84-
releaseMachineExec() {
85-
invokeAction eclipse-che/che-machine-exec "Release Che Machine Exec" "7369994" "version=${CHE_VERSION}"
86-
}
102+
#################### PHASE 1 ####################
87103

88104
releaseCheCode() {
89105
invokeAction che-incubator/che-code "Release Che Code" "34764281" "version=${CHE_VERSION}"
90106
}
91107

108+
releaseConfigbump() {
109+
invokeAction che-incubator/configbump "Release Che Configbump" "69757177" "version=${CHE_VERSION}"
110+
}
92111

93-
releaseDevworkspaceGenerator() {
94-
invokeAction eclipse-che/che-devfile-registry "Release Che Devworkspace Generator" "67742638" "version=${CHE_VERSION}"
112+
releaseMachineExec() {
113+
invokeAction eclipse-che/che-machine-exec "Release Che Machine Exec" "7369994" "version=${CHE_VERSION}"
95114
}
96115

97-
releaseDevfileRegistry() {
98-
invokeAction eclipse-che/che-devfile-registry "Release Che Devfile Registry" "4191260" "version=${CHE_VERSION}"
116+
releaseCheServer() {
117+
invokeAction eclipse-che/che-server "Release Che Server" "9230035" "version=${CHE_VERSION},releaseParent=${RELEASE_CHE_PARENT},versionParent=${VERSION_CHE_PARENT}"
99118
}
100-
releasePluginRegistry() {
101-
invokeAction eclipse-che/che-plugin-registry "Release Che Plugin Registry" "4191251" "version=${CHE_VERSION}"
119+
120+
releaseDevworkspaceGenerator() {
121+
invokeAction eclipse-che/che-devfile-registry "Release Che Devworkspace Generator" "67742638" "version=${CHE_VERSION}"
102122
}
103123

104124
createBranches() {
105-
invokeAction che-incubator/configbump "Create branch" "11029799" "branch=${BRANCH}"
106125
invokeAction che-incubator/kubernetes-image-puller "Create branch" "5409996" "branch=${BRANCH}"
107126
}
108127

109-
releaseDashboard() {
110-
invokeAction eclipse-che/che-dashboard "Release Che Dashboard" "3152474" "version=${CHE_VERSION}"
111-
}
128+
#################### PHASE 2 ####################
112129

113130
releaseCheE2E() {
114131
invokeAction eclipse/che "Release Che E2E" "5536792" "version=${CHE_VERSION}"
115132
}
116133

117-
releaseCheServer() {
118-
invokeAction eclipse-che/che-server "Release Che Server" "9230035" "version=${CHE_VERSION},releaseParent=${RELEASE_CHE_PARENT},versionParent=${VERSION_CHE_PARENT}"
134+
releasePluginRegistry() {
135+
invokeAction eclipse-che/che-plugin-registry "Release Che Plugin Registry" "4191251" "version=${CHE_VERSION}"
119136
}
120137

121-
releaseCheOperator() {
122-
invokeAction eclipse-che/che-operator "Release Che Operator" "3593082" "version=${CHE_VERSION}"
138+
releaseDashboard() {
139+
invokeAction eclipse-che/che-dashboard "Release Che Dashboard" "3152474" "version=${CHE_VERSION}"
123140
}
124141

125-
setupGitconfig() {
126-
ne else?
127-
git config --global user.name "Mykhailo Kuznietsov"
128-
git config --global user.email mkuznets@redhat.com
142+
#################### PHASE 3 ####################
129143

130-
# hub CLI configuration
131-
git config --global push.default matching
144+
releaseDevfileRegistry() {
145+
invokeAction eclipse-che/che-devfile-registry "Release Che Devfile Registry" "4191260" "version=${CHE_VERSION}"
146+
}
132147

133-
# suppress warnings about how to reconcile divergent branches
134-
git config --global pull.ff only
148+
#################### PHASE 4 ####################
135149

136-
# NOTE when invoking action from che-incubator/* repos (not eclipse/che* repos), must use CHE_INCUBATOR_BOT_GITHUB_TOKEN
137-
# default to CHE_BOT GH token
138-
export GITHUB_TOKEN="${CHE_BOT_GITHUB_TOKEN}"
150+
releaseCheOperator() {
151+
invokeAction eclipse-che/che-operator "Release Che Operator" "3593082" "version=${CHE_VERSION}"
139152
}
140153

141154
while [[ "$#" -gt 0 ]]; do
@@ -159,17 +172,21 @@ chmod 0400 "$HOME/.ssh/id_rsa"
159172
ssh-keyscan github.com >> ~/.ssh/known_hosts
160173
set -x
161174

175+
#################### SETUP ####################
176+
162177
checkForBlockerIssues
163178
setupGitconfig
164-
165179
evaluateCheVariables
166180
echo "BASH VERSION = $BASH_VERSION"
167181
set -e
168182

183+
#################### PHASE 1 ####################
184+
169185
# Release projects that don't depend on other projects
170-
set +x
186+
set +x
171187
if [[ ${PHASES} == *"1"* ]]; then
172188
releaseCheCode
189+
releaseConfigbump
173190
releaseMachineExec
174191
releaseCheServer
175192
releaseDevworkspaceGenerator
@@ -179,15 +196,18 @@ wait
179196
# shellcheck disable=SC2086
180197
verifyContainerExistsWithTimeout ${REGISTRY}/che-incubator/che-code:${CHE_VERSION} 60
181198
# shellcheck disable=SC2086
199+
verifyContainerExistsWithTimeout ${REGISTRY}/che-incubator/configbump:${CHE_VERSION} 60
200+
# shellcheck disable=SC2086
182201
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-machine-exec:${CHE_VERSION} 60
183202
# shellcheck disable=SC2086
184203
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-server:${CHE_VERSION} 60
185204
# shellcheck disable=SC2086
186-
verifyBranchExistsWithTimeoutAndExit "https://github.com/che-incubator/configbump.git" ${BRANCH} 60
187-
# shellcheck disable=SC2086
188205
verifyBranchExistsWithTimeoutAndExit "https://github.com/che-incubator/kubernetes-image-puller.git" ${BRANCH} 60
189206
# shellcheck disable=SC2086
190207
verifyNpmJsPackageExistsWithTimeoutAndExit "@eclipse-che/che-devworkspace-generator@${CHE_VERSION}" 60
208+
209+
#################### PHASE 2 ####################
210+
191211
set +x
192212
# Release e2e (depends on che-server, devworkspace-generator)
193213
# Release plugin registry (depends on machine-exec)
@@ -197,21 +217,25 @@ if [[ ${PHASES} == *"2"* ]]; then
197217
releaseDashboard
198218
fi
199219
wait
200-
201220
# shellcheck disable=SC2086
202221
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-e2e:${CHE_VERSION} 30
203222
# shellcheck disable=SC2086
204223
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-plugin-registry:${CHE_VERSION} 30
205224
# shellcheck disable=SC2086
206225
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-dashboard:${CHE_VERSION} 60
226+
227+
#################### PHASE 3 ####################
228+
207229
# Release devfile registry (depends on plugin registry)
208230
if [[ ${PHASES} == *"3"* ]]; then
209231
releaseDevfileRegistry
210232
fi
211233
wait
212-
213234
# shellcheck disable=SC2086
214235
verifyContainerExistsWithTimeout ${REGISTRY}/${ORGANIZATION}/che-devfile-registry:${CHE_VERSION} 60
236+
237+
#################### PHASE 4 ####################
238+
215239
# Create operator PRs (depends on devfile registry)
216240
set +x
217241
if [[ ${PHASES} == *"4"* ]]; then

updateBaseImagesInChe.sh

100644100755
File mode changed.

utils/util.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ die_with()
99
computeWorkflowId() {
1010
this_repo=$1
1111
this_action_name=$2
12-
workflow_id=$(curl -sSL "https://api.github.com/repos/${this_repo}/actions/workflows" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" | jq --arg search_field "${this_action_name}" '.workflows[] | select(.name == $search_field).id'); # echo "workflow_id = $workflow_id"
12+
workflow_id=$(curl -sSL "https://api.github.com/repos/${this_repo}/actions/workflows" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" | jq --arg search_field "${this_action_name}" '.workflows[] | select(.name == $search_field).id');
13+
# echo "workflow_id = $workflow_id"
1314
if [[ ! $workflow_id ]]; then
1415
die_with "[ERROR] Could not compute workflow id from https://api.github.com/repos/${this_repo}/actions/workflows - check your GITHUB_TOKEN is active"
1516
fi
16-
# echo "[INFO] Got workflow_id $workflow_id for $this_repo action '$this_action_name'"
17+
echo "[INFO] Got workflow_id $workflow_id for $this_repo action '$this_action_name'"
1718
}
1819

1920
# generic method to call a GH action and pass in a single var=val parameter

0 commit comments

Comments
 (0)