Skip to content

Commit 22de3d0

Browse files
authored
README - update release process (#547)
1 parent 9a23d7f commit 22de3d0

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,6 @@ docs/source/rst
118118

119119
# General
120120
local-cluster/_hco/
121+
122+
# nmp
123+
node_modules/

README.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# openshift-python-wrapper
22
Pypi: [openshift-python-wrapper](https://pypi.org/project/openshift-python-wrapper)
33
A python wrapper for [openshift-restclient-python](https://github.com/openshift/openshift-restclient-python) with support for RedHat Container Virtualization. ([Openshift Virtualization](https://www.openshift.com/learn/topics/virtualization))
4+
Docs: [openshift-python-wrapper docs](https://openshift-python-wrapper.readthedocs.io/en/latest/)
45

56
## Installation
67
From source:
@@ -14,22 +15,38 @@ From pypi:
1415
pip install openshift-python-wrapper --user
1516
```
1617

17-
## Bump a version number
18-
* Create a PR
19-
* Update setup.cfg:
20-
Update version (for example: 1.5 -> 1.6) and
21-
download_url (for example: https://github.com/RedHatQE/openshift-python-wrapper/archive/refs/tags/v1.6.tar.gz)
22-
* Merge the PR
23-
* Bump the version via [Github](https://github.com/RedHatQE/openshift-python-wrapper/releases)
24-
* Create a PR for changelog
25-
* Generate CHANGELOG.md [how-to](#changelog)
26-
* Merge the PR
18+
## Release new version
19+
### requirements:
20+
* Export GitHub token
21+
```bash
22+
export GITHUB_TOKEN=<your_github_token>
23+
```
24+
* [release-it](https://github.com/release-it/release-it)
25+
```bash
26+
sudo npm install --global release-it
27+
npm install --save-dev @j-ulrich/release-it-regex-bumper
28+
rm -f package.json package-lock.json
29+
```
30+
### usage:
31+
* Create a release, run from the relevant branch.
32+
To create a 4.10 release, run:
33+
```bash
34+
git checkout v4.10
35+
release-it # Follow the instructions
36+
```
2737

38+
## docs
39+
Hosted on readthedocs.io [openshift-python-wrapper](https://openshift-python-wrapper.readthedocs.io/en/latest/)
40+
41+
## PR dependency
42+
For PR dependency we use [dpulls](https://www.dpulls.com/)
43+
To make PR depends on other PR add `depends on #<PR NUMBER>` in the PR description.
44+
45+
## Logging configuration
46+
To change log level export OPENSHIFT_PYTHON_WRAPPER_LOG_LEVEL:
2847

29-
## changelog
30-
Changelog is generated using [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator)
3148
```bash
32-
github_changelog_generator -u RedHatQE -p openshift-python-wrapper -t <TOKEN>
49+
export OPENSHIFT_PYTHON_WRAPPER_LOG_LEVEL=<LOG_LEVEL> # can be: "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
3350
```
3451

3552
## Examples
@@ -119,6 +136,21 @@ command_output = test_vmi.virt_launcher_pod.execute(command="command-example")
119136
```
120137
If no Pod was found, will raise ``ResourceNotFoundError``.
121138

139+
### NNCP Capture Syntax
140+
Using capture syntax to switch ipv4 config between interfaces
141+
```python
142+
with NodeNetworkConfigurationPolicy(
143+
name="capture_nncp",
144+
capture={'first-nic': 'interfaces.name=="ens8"',
145+
'second-nic': 'interfaces.name=="ens9"'},
146+
teardown=False, # Capture doesn't support reverting config on teardown
147+
...
148+
) as nncp:
149+
nncp.add_interface(name="{{ capture.first-nic.interfaces.0.name }}", set_ipv4="{{ capture.second-nic.interfaces.0.ipv4 }}")
150+
nncp.add_interface(name="{{ capture.second-nic.interfaces.0.name }}", set_ipv4="{{ capture.first-nic.interfaces.0.ipv4 }}")
151+
yield nncp
152+
```
153+
122154
## Code check
123155
We use pre-commit for code check.
124156
```bash

0 commit comments

Comments
 (0)