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

Commit 4495136

Browse files
author
Jiri Tomasek
authored
Merge pull request #363 from mareklibra/openshift-assisted-ui-lib.rename
Changes after facet-lib to openshift-assisted-ui-lib rename
2 parents 574ac6a + 7f4f61e commit 4495136

10 files changed

+50
-51
lines changed

Diff for: hacks/README.md

+19-20
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
These scripts simplify builds, deployments or development.
44

5-
## update-facet-lib
6-
Can be executed right after `facet-lib` release to update it's version in
5+
## update-assisted-ui-lib
6+
Can be executed right after `assisted-ui-lib` release to update it's version in
77
- the facet application
88
- the uhc-portal (OCM)
99

@@ -17,7 +17,7 @@ Recently not used.
1717
## patch-react-scripts.sh
1818
Called from the yarn's `postinstall` phase to watch changes under `node_modules` within `yarn start`.
1919

20-
With this change, the `facet-lib` can be updated on-the-fly during development.
20+
With this change, the `openshift-assisted-ui-lib` dependency can be updated on-the-fly during development.
2121

2222
## ocm-deployed-version.sh
2323
Used by QE to check recent version deployed in the staging environment.
@@ -28,52 +28,51 @@ Used to create a virtual machine from an ISO (like a discovery iso), tested in o
2828
See comments inside the script for further details.
2929

3030
# 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.
31+
Please note, the `facet` application features heavily depend on the `openshift-assisted-ui-lib` JavaSript library which needs to be released along the `facet` application.
3232

3333
Recently release versions of both project are alligned to simplify testing.
3434

3535
## Prerequisities
3636
- Have [uhc-portal](https://gitlab.cee.redhat.com/service/uhc-portal) fork
3737
- 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
38+
- if not, use `GITLAB_USER=` env variable when calling `update-assisted-ui-lib.sh` script bellow
4039
## Steps
4140

4241
When releasing new version, following steps are executed:
4342
- **Approve and merge** open PRs in both
4443
- [facet pull requests](https://github.com/openshift-metal3/facet/pulls)
45-
- [facet-lib pull requests](https://github.com/mareklibra/facet-lib/pulls)
44+
- [assisted-ui-lib pull requests](https://github.com/openshift-assisted/assisted-ui-lib/pulls)
4645

47-
- **Release** [facet-lib via GitHub](https://github.com/mareklibra/facet-lib/releases/new)
46+
- **Release** [openshift-assisted-ui-lib via GitHub](https://github.com/openshift-assisted/assisted-ui-lib/releases/new)
4847
- **Be careful** when providing following input
4948
- Tag version in format:
5049
- v1.4.8 or v1.4.8-1 ; notice the letter `v` prefixing the version
5150
- Release title:
5251
- use the same as the tag
5352
- Description:
5453
- 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
54+
- To do so, use this [sorted list of closed PRs](https://github.com/openshift-assisted/assisted-ui-lib/pulls?q=is%3Apr+is%3Aclosed+sort%3Aupdated-desc)
55+
- *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 `assisted-ui-lib`
56+
- *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 can be trigerred by a new tag only.
57+
- **Close/re-open** [a generated PR in the assisted-ui-lib](https://github.com/openshift-assisted/assisted-ui-lib/pulls) which is increasing project's version.
58+
- **Approve this PR and merge A.S.A.P.** to avoid other PRs slipping in
6059
- *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)
60+
- **Wait till** new `openshift-assisted-ui-lib` version is automatically published to [npmjs.com](https://www.npmjs.com/package/openshift-assisted-ui-lib)
6261

63-
- **Update** `facet-lib` in the `facet` and `uhc-portal`
62+
- **Update** `openshift-assisted-ui-lib` in the `facet` and `uhc-portal` via
6463
- ```
65-
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-facet-lib.sh | sh -
64+
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-assisted-ui-lib.sh | sh -
6665
```
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:
66+
- Watch output of the script. It might happen in rare cases that new `openshift-assisted-ui-lib` version is not automatically found (i.e. due to short delay), so you can force it by:
6867
```
69-
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-facet-lib.sh | FACET_LIB_VERSION=1.4.8 sh -
68+
$ curl https://raw.githubusercontent.com/openshift-metal3/facet/master/hacks/update-assisted-ui-lib.sh | ASSISTED_UI_LIB_VERSION=1.5.0 sh -
7069
```
7170
- New browser tabs are opened, **finish the process** there by:
72-
- merge `facet-lib` version (if you missed that in the steps above)
71+
- merge `assisted-ui-lib` version update (if you missed that in the steps above)
7372
- open a merge request to `uhc-portal`
7473
- confirm new `facet` project release - **append** description if needed
7574
- 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
75+
- use [assisted-ui-lib's release notes](https://github.com/openshift-assisted/assisted-ui-lib/releases) to guide you
7776
- *Note:* We are working on automating this step
7877
7978
- **Announce** new release on `#forum-assisted-installer-qe` slack channel to trigger QA

Diff for: hacks/ocm-deployed-version.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
set -e
33

4-
# Prints facet-lib version currently deployed in OCM staging
4+
# Prints openshift-assisted-ui-lib version currently deployed in OCM staging
55

66
export YARN_LOCK=${YARN_LOCK:-https://gitlab.cee.redhat.com/service/uhc-portal/-/raw/master/yarn.lock}
77

8-
curl --silent ${YARN_LOCK} | awk '/^facet-lib@/{getline; print}' - | sed -e 's/^.*"\(.*\)"/\1/'
8+
curl --silent ${YARN_LOCK} | awk '/^openshift-assisted-ui-lib@/{getline; print}' - | sed -e 's/^.*"\(.*\)"/\1/'
99

Diff for: hacks/patch-react-scripts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Fixes issue with watching changes to node_modules/facet_lib by webpack dev server
1+
# Fixes issue with watching changes to node_modules/openshift-assisted-ui-lib by webpack dev server
22
sed -i 's/ ignored: ignoredFiles/ \/\* See hacks\/patch-react-scripts.sh \*\/ \/\/ ignored: ignoredFiles/g' node_modules/react-scripts/config/webpackDevServer.config.js
33

Diff for: hacks/update-facet-lib.sh renamed to hacks/update-assisted-ui-lib.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export GREEN_COLOR='\033[0;32m'
66
export NC='\033[0m' # No Color
77

88
# this is more handy than yarn-upgrade
9-
export FACET_LIB_VERSION=${FACET_LIB_VERSION:-"`npm cache clean --force ; npm search facet-lib --parseable|grep '^facet-lib'|cut -f 5`"}
10-
echo -e "${GREEN_COLOR}FACET_LIB_VERSION: ${RED_COLOR}$FACET_LIB_VERSION${NC}"
9+
export ASSISTED_UI_LIB_VERSION=${ASSISTED_UI_LIB_VERSION:-"`npm cache clean --force ; npm search openshift-assisted-ui-lib --parseable|grep '^openshift-assisted-ui-lib'|cut -f 5`"}
10+
echo -e "${GREEN_COLOR}ASSISTED_UI_LIB_VERSION: ${RED_COLOR}$ASSISTED_UI_LIB_VERSION${NC}"
1111

1212
export GITHUB_USER=${GITHUB_USER:-"`whoami`"}
1313
echo GITHUB_USER: $GITHUB_USER
@@ -20,10 +20,10 @@ echo FACET_USER_REPO: $FACET_USER_REPO
2020
export UHC_PORTAL_REPO=${UHC_PORTAL_REPO:-"https://gitlab.cee.redhat.com/${GITLAB_USER}/uhc-portal.git"}
2121
echo UHC_PORTAL_REPO: ${UHC_PORTAL_REPO}
2222

23-
export TAG=${TAG:-"facet-lib-${FACET_LIB_VERSION}"}
24-
export UPDATE_BRANCH="facet-lib.auto.v${FACET_LIB_VERSION}"
23+
export TAG=${TAG:-"assisted-ui-lib-${ASSISTED_UI_LIB_VERSION}"}
24+
export UPDATE_BRANCH="assisted-ui-lib.auto.v${ASSISTED_UI_LIB_VERSION}"
2525

26-
export TMPDIR=`mktemp -d /tmp/facet-lib-XXXX`
26+
export TMPDIR=`mktemp -d /tmp/facet-XXXX`
2727
echo TMPDIR: $TMPDIR
2828

2929
# update facet
@@ -35,14 +35,14 @@ git remote add upstream https://github.com/openshift-metal3/facet.git
3535
git fetch --all && git reset --hard upstream/master
3636
git checkout -b ${UPDATE_BRANCH}
3737

38-
sed -i "s/^ \"facet-lib\": \".*\",$/ \"facet-lib\": \"^${FACET_LIB_VERSION}\",/g" package.json
38+
sed -i "s/^ \"openshift-assisted-ui-lib\": \".*\",$/ \"openshift-assisted-ui-lib\": \"^${ASSISTED_UI_LIB_VERSION}\",/g" package.json
3939
yarn install
4040
git status
4141
git diff
4242
git add package.json yarn.lock
4343

44-
git commit -m "Update facet-lib to ${FACET_LIB_VERSION}"
45-
git tag -a ${TAG} -m "facet-lib updated to version ${FACET_LIB_VERSION}"
44+
git commit -m "Update openshift-assisted-ui-lib to ${ASSISTED_UI_LIB_VERSION}"
45+
git tag -a ${TAG} -m "openshift-assisted-ui-lib updated to version ${ASSISTED_UI_LIB_VERSION}"
4646

4747
# update uhc-portal
4848
echo -e "${GREEN_COLOR}Updating uhc-portal${NC}"
@@ -53,13 +53,13 @@ git remote add upstream git@gitlab.cee.redhat.com:service/uhc-portal.git
5353
git fetch --all && git reset --hard upstream/master
5454
git checkout -b ${UPDATE_BRANCH}
5555

56-
sed -i "s/^ \"facet-lib\": \".*\",$/ \"facet-lib\": \"^${FACET_LIB_VERSION}\",/g" package.json
56+
sed -i "s/^ \"openshift-assisted-ui-lib\": \".*\",$/ \"openshift-assisted-ui-lib\": \"^${ASSISTED_UI_LIB_VERSION}\",/g" package.json
5757
yarn install
5858
git status
5959
git diff
6060
git add package.json yarn.lock
6161

62-
git commit -m "Update facet-lib to ${FACET_LIB_VERSION}"
62+
git commit -m "Update openshift-assisted-ui-lib to ${ASSISTED_UI_LIB_VERSION}"
6363
# no tag for uhc-portal, just commit
6464

6565
# All remote changes at the end
@@ -74,9 +74,9 @@ echo Pushing to ${FACET_USER_REPO} to create a pull request there
7474
git push --set-upstream origin ${UPDATE_BRANCH} --follow-tags
7575

7676
# The last mile in a browser for convenience
77-
xdg-open "https://github.com/mareklibra/facet-lib/pulls" & # to close/re-open generated PR (optional)
77+
xdg-open "https://github.com/openshift-assisted/assisted-ui-lib/pulls" & # to close/re-open generated PR (optional)
7878
xdg-open https://gitlab.cee.redhat.com/${GITLAB_USER}/uhc-portal/-/merge_requests/new?merge_request%5Bsource_branch%5D=${UPDATE_BRANCH} &
79-
xdg-open "https://github.com/openshift-metal3/facet/releases/new?tag=v${FACET_LIB_VERSION}&title=v${FACET_LIB_VERSION}&body=REMOVE THIS REMINDER: Do not forget to merge pull-request with facet-lib update BEFORE creating new release here.%0A%0A${TAG}: https://github.com/mareklibra/facet-lib/releases/tag/v${FACET_LIB_VERSION}" &
79+
xdg-open "https://github.com/openshift-metal3/facet/releases/new?tag=v${ASSISTED_UI_LIB_VERSION}&title=v${ASSISTED_UI_LIB_VERSION}&body=REMOVE THIS REMINDER: Do not forget to merge pull-request with openshift-assisted-ui-lib update BEFORE creating new release here.%0A%0A${TAG}: https://github.com/openshift-assisted/assisted-ui-lib/releases/tag/v${ASSISTED_UI_LIB_VERSION}" &
8080
xdg-open https://github.com/${GITHUB_USER}/facet/pull/new/${UPDATE_BRANCH} & # <--- Pay attention to this before creating a new release in facet!
8181

8282
echo -e "All set. Continue by create and ${GREEN_COLOR}merge${NC} Pull Request in the facet project"

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@typescript-eslint/parser": "^2.24.0",
3535
"axios": "^0.19.2",
3636
"axios-case-converter": "^0.6.0",
37-
"facet-lib": "^1.4.9",
37+
"openshift-assisted-ui-lib": "^1.5.0-pre2",
3838
"file-saver": "^2.0.2",
3939
"formik": "^2.1.4",
4040
"http-proxy-middleware": "^1.0.3",

Diff for: src/components/AboutModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
TextContent,
66
ButtonVariant,
77
} from '@patternfly/react-core';
8-
import { Api, DetailList, DetailItem, Config } from 'facet-lib';
8+
import { Api, DetailList, DetailItem, Config } from 'openshift-assisted-ui-lib';
99
import { GIT_SHA, VERSION, SERVICE_LABELS, IMAGE_REPO } from '../config/standalone';
1010
import redHatLogo from '../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png';
1111

@@ -86,7 +86,7 @@ const AboutModal: React.FC<AboutModalProps> = ({ isOpen, onClose }) => {
8686
<DetailItem title="Assisted Installer UI version" value={getUIVersion()} />
8787
<DetailItem
8888
title="Assisted Installer UI library version"
89-
value={Config.getFacetLibVersion()}
89+
value={Config.getAssistedUiLibVersion()}
9090
/>
9191
{Object.keys(versions || {}).map((key) => {
9292
const version = versions ? versions[key] : '';

Diff for: src/components/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { Provider } from 'react-redux';
33
import { Router } from 'react-router-dom';
44
import { Page } from '@patternfly/react-core';
5-
import { Store, Router as LibRouter } from 'facet-lib';
5+
import { Store, Router as LibRouter } from 'openshift-assisted-ui-lib';
66
import history from '../history';
77
import Header from './ui/Header';
88
// import Sidebar from './Sidebar';

Diff for: src/components/ui/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Brand, PageHeader, PageHeaderTools, Button, ButtonVariant } from '@patternfly/react-core';
3-
import { Config } from 'facet-lib';
3+
import { Config } from 'openshift-assisted-ui-lib';
44
import metal3FacetLogo from '../../images/metal3_facet-whitetext.png';
55
import redhatLogo from '../../images/Logo-Red_Hat-OpenShift_Container_Platform-B-Reverse-RGB.png';
66
import { ExternalLinkAltIcon } from '@patternfly/react-icons';

Diff for: src/styles/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
*/
77
@import '~@patternfly/patternfly/patternfly.css';
88
@import '~@patternfly/patternfly/patternfly-addons.css';
9-
@import '~facet-lib/dist/index.css';
9+
@import '~openshift-assisted-ui-lib/dist/index.css';

Diff for: yarn.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -5201,16 +5201,6 @@ extsprintf@^1.2.0:
52015201
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
52025202
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
52035203

5204-
facet-lib@^1.4.9:
5205-
version "1.4.9"
5206-
resolved "https://registry.yarnpkg.com/facet-lib/-/facet-lib-1.4.9.tgz#c2857c2aa342c8b6ca8e06c8d3c64d31d41a8592"
5207-
integrity sha512-AitZN/a5zZoFb6sl7fjrZ+ZACnEc/wx4AHF0t7B3KTVbexeO+dfCN3sl8bFgvD2mqNOrV7e68ZEd2B3i12pHZQ==
5208-
dependencies:
5209-
axios-case-converter "^0.6.0"
5210-
ip-address "^7.1.0"
5211-
is-in-subnet "^3.1.0"
5212-
unique-names-generator "^4.2.0"
5213-
52145204
fast-deep-equal@^3.1.1:
52155205
version "3.1.3"
52165206
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
@@ -8631,6 +8621,16 @@ open@^7.0.2:
86318621
is-docker "^2.0.0"
86328622
is-wsl "^2.1.1"
86338623

8624+
openshift-assisted-ui-lib@^1.5.0-pre2:
8625+
version "1.5.0-pre2"
8626+
resolved "https://registry.yarnpkg.com/openshift-assisted-ui-lib/-/openshift-assisted-ui-lib-1.5.0-pre2.tgz#2197c469151df53f2639bd4e74f98a7aabc7ce22"
8627+
integrity sha512-4Eb5KyaPqUWKX50rhqtNL3uBL/a3TR513PslsnpKFHkb2iavzdo7W7gForbGt08+i3iWPzxTI6EdagpzQXUG6Q==
8628+
dependencies:
8629+
axios-case-converter "^0.6.0"
8630+
ip-address "^7.1.0"
8631+
is-in-subnet "^3.1.0"
8632+
unique-names-generator "^4.2.0"
8633+
86348634
opn@^5.5.0:
86358635
version "5.5.0"
86368636
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"

0 commit comments

Comments
 (0)