Skip to content

Commit 634c1aa

Browse files
Update README.md with usage
1 parent d78648e commit 634c1aa

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
11
# operator-bundle-validate-container
22
CVP midstream operator bundle validate container
3+
4+
# Usage
5+
6+
## Building image on local machine
7+
8+
```
9+
git clone https://github.com/redhat-operator-ecosystem/operator-bundle-validate-container
10+
cd operator-bundle-validate-container
11+
### podman build -t <image_name>:<tagname> -f <filepath>
12+
podman build -t midstream_image:latest -f Dockerfile
13+
```
14+
15+
## Running image with operator bundle
16+
17+
```
18+
podman run -it -v <operator_bundle_dir>:/project/operator-bundle -v <output_log>:/project/output --security-opt label=disable <imagename>:<tagname>
19+
20+
podman run -it -v ./example-bundle:/project/operator-bundle -v ./output_logs:/project/output --security-opt label=disable midstream:latest
21+
```
22+
23+
### Note:
24+
Example operator bundle tree looks as follows:
25+
```
26+
example-bundle
27+
├── manifests
28+
│   ├── clusterresourceoverride.crd.yaml
29+
│   └── clusterresourceoverride-operator.v4.6.0.clusterserviceversion.yaml
30+
└── metadata
31+
└── annotations.yaml
32+
```
33+
34+
#### Example Output of the container
35+
```
36+
operatorSDKVersion is operator-sdk version: "v1.4.0", commit: "67f9c8b888887d18cd38bb6fd85cf3cf5b94fd99", kubernetes version: "1.19.4", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"
37+
Operator bundle validation Return Code is 0
38+
Operator bundle Validation output is
39+
time="2021-02-12T01:16:57Z" level=debug msg="Debug logging is set"
40+
time="2021-02-12T01:16:57Z" level=debug msg="Found manifests directory" bundle-dir=../operator-bundle container-tool=docker
41+
time="2021-02-12T01:16:57Z" level=debug msg="Found metadata directory" bundle-dir=../operator-bundle container-tool=docker
42+
time="2021-02-12T01:16:57Z" level=debug msg="Getting mediaType info from manifests directory" bundle-dir=../operator-bundle container-tool=docker
43+
time="2021-02-12T01:16:57Z" level=info msg="Found annotations file" bundle-dir=../operator-bundle container-tool=docker
44+
time="2021-02-12T01:16:57Z" level=info msg="Could not find optional dependencies file" bundle-dir=../operator-bundle container-tool=docker
45+
time="2021-02-12T01:16:57Z" level=debug msg="Validating bundle contents" bundle-dir=../operator-bundle container-tool=docker
46+
time="2021-02-12T01:16:57Z" level=info msg="All validation tests have completed successfully"
47+
48+
Bundle image validation is successful
49+
```

0 commit comments

Comments
 (0)