Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Commit 2c78966

Browse files
authored
Merge pull request #352 from mareklibra/hacks.README
Initial version of the hacks/README.md
2 parents b9e84e5 + 3619352 commit 2c78966

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

Diff for: hacks/README.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# The hacks/* Scripts
2+
3+
These scripts simplify builds, deployments or development.
4+
5+
## update-facet-lib
6+
Can be executed right after `facet-lib` release to update it's version in
7+
- the facet application
8+
- the uhc-portal (OCM)
9+
10+
**Please see `The Release Process` section bellow before using it.**
11+
12+
## run-tests.sh
13+
Executes containerized tests.
14+
15+
Recently not used.
16+
17+
## patch-react-scripts.sh
18+
Called from the yarn's `postinstall` phase to watch changes under `node_modules` within `yarn start`.
19+
20+
With this change, the `facet-lib` can be updated on-the-fly during development.
21+
22+
## ocm-deployed-version.sh
23+
Used by QE to check recent version deployed in the staging environment.
24+
25+
## create-test-vm.sh
26+
Used to create a virtual machine from an ISO (like a discovery iso), tested in our development environments (no guarantee about other envs).
27+
28+
See comments inside the script for further details.
29+
30+
# The Release Process
31+
Please note, the `facet` application features heavily depend on the `facet-lib` JavaSript library which needs to be released along the `facet` application.
32+
33+
Recently release versions of both project are alligned to simplify testing.
34+
35+
## Prerequisities
36+
- Have [uhc-portal](https://gitlab.cee.redhat.com/service/uhc-portal) fork
37+
- Local username (`whoami`) is equal to the gitlab's username
38+
- if not, use `GITLAB_USER=` env variable when calling `update-facet-lib.sh` script bellow
39+
- Privileges to write to `facet` master - for tags and `facet-lib` version update
40+
## Steps
41+
42+
When releasing new version, following steps are executed:
43+
- **Approve and merge** open PRs in both
44+
- [facet pull requests](https://github.com/openshift-metal3/facet/pulls)
45+
- [facet-lib pull requests](https://github.com/mareklibra/facet-lib/pulls)
46+
47+
- **Release** [facet-lib via GitHub](https://github.com/mareklibra/facet-lib/releases/new)
48+
- **Be careful** when providing following input
49+
- Tag version in format:
50+
- v1.4.8 or v1.4.8-1 ; notice the letter `v` prefixing the version
51+
- Release title:
52+
- use the same as the tag
53+
- Description:
54+
- Unless automated in the future, copy&paste all PR titles since last release.
55+
- To do so, use this [sorted list of closed PRs](https://github.com/mareklibra/facet-lib/pulls?q=is%3Apr+is%3Aclosed+sort%3Aupdated-desc)
56+
- *Note:* As a consequence, a GitHub action is trigerred on new tag created to build the library, publish to npmjs.com and generate a PR in the `facet-lib`
57+
- *Note:* It is recommended to use GitHub web to compose a release to keep track of changes. However, the GitHub action doing majority of the work is trigerred by a new tag only.
58+
- **Close/re-open** [a generated PR in the facet-lib](https://github.com/mareklibra/facet-lib/pulls) which is increasing project's version.
59+
- **Approve this PR and merge a.s.a.p.** to avoid other PRs slipping in
60+
- *Note:* It is a GitHub's feature that an action can not trigger execution of another action. So without close/reopen the CI will not be executed on this PR.
61+
- **Wait till** new `facet-lib` version is automatically published to [npmjs.com](https://www.npmjs.com/package/facet-lib)
62+
63+
- **Update** `facet-lib` in the `facet` and `uhc-portal`
64+
- ```
65+
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-facet-lib.sh | sh -
66+
```
67+
- Watch output of the script. It might happen in rare cases that new `facet-lib` version is not automatically found (i.e. due to short delay), so you can force it by:
68+
```
69+
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-facet-lib.sh | FACET_LIB_VERSION=1.4.8 sh -
70+
```
71+
- New browser tabs are opened, **finish the process** there by:
72+
- merge `facet-lib` version (if you missed that in the steps above)
73+
- open a merge request to `uhc-portal`
74+
- confirm new `facet` project release - **append** description if needed
75+
- Pass through all Jira and Bugzilla tickets and **fill `Fixed in version`**
76+
- use [facet-lib's release notes](https://github.com/mareklibra/facet-lib/releases) to guide you
77+
- *Note:* We are working on automating this step
78+
79+
- **Announce** new release on `#forum-assisted-installer-qe` slack channel to trigger QA
80+
81+
## To Be Docummented
82+
So far missigned from the docummentation above:
83+
- Downstream build

0 commit comments

Comments
 (0)