Skip to content

Commit a0b1c7d

Browse files
Merge pull request #462 from umohnani8/docs
: no-jira: Update Makefile and Add Testing Info
2 parents 77e5739 + a3b01ab commit a0b1c7d

38 files changed

+411
-203
lines changed

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
99

1010
IMAGE_REGISTRY :=registry.ci.openshift.org
1111

12+
# Check which builder to use - default is imagebuilder
13+
ifeq ($(BUILDER), podman)
14+
# Use podman to build the must gather image
15+
# Please ensure you have podman installed on your machine for this
16+
IMAGE_BUILD_BUILDER := podman build
17+
# Clear all build default flags
18+
IMAGE_BUILD_DEFAULT_FLAGS :=
19+
# Set authfile if the user passes another location for the authentication file
20+
ifneq ($(strip $(AUTH_FILE)),)
21+
IMAGE_BUILD_DEFAULT_FLAGS := --authfile=$(AUTH_FILE)
22+
endif
23+
endif
24+
25+
1226
# This will call a macro called "build-image" which will generate image specific targets based on the parameters:
1327
# $0 - macro name
1428
# $1 - target name

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,23 @@ included.
1515
You can run `must-gather` on a cluster with `oc adm must-gather`.
1616
Use `-h` flag to see available options.
1717

18+
## How to test
19+
Build a new must-gather image with your changes using the Makefile. There are two options in the Makefile, `make` will use imagebuilder to build the image while `make BUILDER=podman` will use podman to build the image.
20+
21+
If using `make BUILDER=podman`, please set the `AUTH_FILE` parameter pointing to an authentication file that has credentials for the `registry.ci.openshift.org` registry. Ensure that you are connected to the VPN before building the image.
22+
```
23+
make BUILDER=podman AUTH_FILE=/path/to/authfile
24+
```
25+
26+
Once the image is built, push it to a registry where it can be accessed from.
27+
```
28+
podman push [built-image] [registry/username/your-built-image]
29+
```
30+
31+
To test your new changes with a cluster, run the following:
32+
```
33+
oc adm must-gather --image=registry/username/your-built-image
34+
```
35+
1836
## Obfuscate confidential information
1937
There is a dedicated effort to obfuscate and omit confidential information. Head over to [openshift/must-gather-clean](https://github.com/openshift/must-gather-clean) for more information.

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/openshift/must-gather
22

3-
go 1.22
3+
go 1.22.0
44

5-
require github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e
5+
toolchain go1.22.7
6+
7+
require github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e h1:F7rBobgSjtYL3/zsgDUjlTVx3Z06hdgpoldpDcn7jzc=
2-
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
1+
github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c h1:6XcszPFZpan4qll5XbdLll7n1So3IsPn28aw2j1obMo=
2+
github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=

vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/Makefile

Lines changed: 10 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/OWNERS

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/default.example.mk.help.log

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/default.mk

Lines changed: 7 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/golang.example.mk.help.log

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/golang.mk

Lines changed: 4 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/operator.mk

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/targets/golang/build.mk

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/targets/golang/test-unit.mk

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/targets/golang/verify-update.mk

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)