File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1
1
# openshift-python-utilities
2
+
2
3
Pypi: [ openshift-python-utilities] ( https://pypi.org/project/openshift-python-utilities/ )
3
4
A utilities repository for [ openshift-restclient-python] ( https://github.com/openshift/openshift-restclient-python )
4
5
5
6
## Release new version
7
+
6
8
### requirements:
9
+
7
10
* Export GitHub token
11
+
8
12
``` bash
9
13
export GITHUB_TOKEN=< your_github_token>
10
14
```
15
+
11
16
* [ release-it] ( https://github.com/release-it/release-it )
12
17
13
18
Run the following once (execute outside repository dir for example ` ~/ ` ):
19
+
14
20
``` bash
15
21
sudo npm install --global release-it
16
22
npm install --save-dev @release-it/bumper
17
23
```
18
24
### usage:
25
+
19
26
* Create a release, run from the relevant branch.
20
27
To create a 4.11 release, run:
28
+
21
29
``` bash
22
30
git checkout v4.11
23
31
git pull
24
32
release-it # Follow the instructions
25
33
```
34
+
35
+ ## Installation
36
+
37
+ From source using [ poetry] ( https://github.com/python-poetry/poetry ) .
38
+
39
+ ```
40
+ git clone https://github.com/RedHatQE/openshift-python-utilities.git
41
+ cd openshift-python-utilities
42
+ poetry install
43
+ ```
44
+
45
+ ## Examples
46
+
47
+ ### Get Client
48
+
49
+ ``` python
50
+ from ocp_utilities.infra import get_client
51
+ client = get_client(config_file = < path to kubeconfig> ))
52
+ ```
53
+
54
+ ### Install Operator
55
+
56
+ ``` python
57
+ from ocp_utilities.operators import install_operator
58
+ install_operator(
59
+ admin_client = client,
60
+ name = < operator name> ,
61
+ channel = < channel> ,
62
+ source = < source> ,
63
+ )
64
+ ```
You can’t perform that action at this time.
0 commit comments