diff --git a/.gitignore b/.gitignore index 77455776..58cf33c4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ kubeconfig # build files dist/ +build/ # changelog is generated automaticaly by hack/generate-changelog.sh # available only in the rendered webpage (built by mkdocs). diff --git a/Makefile b/Makefile index 4e2d8499..ff2be748 100644 --- a/Makefile +++ b/Makefile @@ -18,10 +18,7 @@ GOARCH ?= amd64 unexport GOFLAGS .PHONY: all -all: build-linux-amd64 -all: build-windows-amd64 -all: build-darwin-amd64 -all: build-darwin-arm64 +all: linux-amd64-container build-windows-amd64 build-darwin-amd64 build-darwin-arm64 .PHONY: build-dep build-dep: @@ -29,8 +26,8 @@ build-dep: .PHONY: build build: build-dep - GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT) $(GO_BUILD_FLAGS) - @cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT) > $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT).sum; cd - + GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH) $(GO_BUILD_FLAGS) + @cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH) > $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH).sum; cd - .PHONY: build-linux-amd64 build-linux-amd64: GOOS = linux @@ -38,10 +35,9 @@ build-linux-amd64: GOARCH = amd64 build-linux-amd64: build .PHONY: build-windows-amd64 -build-windows-amd64: GOOS = windows -build-windows-amd64: GOARCH = amd64 -build-windows-amd64: GOEXT = .exe -build-windows-amd64: build +build-windows-amd64: build-dep + GOOS=windows GOARCH=amd64 go build -o $(BUILD_DIR)/opct-windows.exe $(GO_BUILD_FLAGS) + @cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-windows-amd64 > $(BUILD_DIR)/opct-windows-amd64.sum; cd - .PHONY: build-darwin-amd64 build-darwin-amd64: GOOS = darwin @@ -57,11 +53,18 @@ build-darwin-arm64: build linux-amd64-container: build-linux-amd64 podman build -t $(IMG):latest -f hack/Containerfile --build-arg=RELEASE_TAG=$(RELEASE_TAG) . -# Utils dev -.PHONY: update-go -update-go: - go get -u - go mod tidy +# Publish devel binaries (non-official). Must be used only for troubleshooting in development/support. +.PHONY: publish-amd64-devel +publish-amd64-devel: build-linux-amd64 + aws s3 cp $(BUILD_DIR)/opct-linux-amd64 s3://openshift-provider-certification/bin/opct-linux-amd64-devel + +.PHONY: publish-darwin-arm64-devel +publish-darwin-arm64-devel: build-darwin-arm64 + aws s3 cp $(BUILD_DIR)/opct-darwin-arm64 s3://openshift-provider-certification/bin/opct-darwin-arm64-devel + +.PHONY: publish-devel +publish-devel: publish-amd64-devel +publish-devel: publish-darwin-arm64-devel .PHONY: test test: diff --git a/cmd/root.go b/cmd/opct/root.go similarity index 99% rename from cmd/root.go rename to cmd/opct/root.go index b774dbe3..816f41bd 100644 --- a/cmd/root.go +++ b/cmd/opct/root.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/viper" "github.com/vmware-tanzu/sonobuoy/cmd/sonobuoy/app" + "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/cmd/report" "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/destroy" - "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/report" "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/retrieve" "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/run" "github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/status" diff --git a/data/templates/report/README.md b/data/templates/report/README.md new file mode 100644 index 00000000..fd6673ef --- /dev/null +++ b/data/templates/report/README.md @@ -0,0 +1,14 @@ +# Report HTML app + +Report is build upon Vue framework using native browser. + +The pages are reactive, using the opct-report.json as data source. + +The opct-report.json is generated by `report` command when processing +the results. + + +References: + +- https://vuejs.org/guide/extras/ways-of-using-vue.html +- https://markus.oberlehner.net/blog/goodbye-webpack-building-vue-applications-without-webpack/ \ No newline at end of file diff --git a/data/templates/report/filter.html b/data/templates/report/filter.html new file mode 100644 index 00000000..31856d90 --- /dev/null +++ b/data/templates/report/filter.html @@ -0,0 +1,447 @@ + + + + +
+ +{{ infoModal.content }}+
CAMGI, Cluster Autoscaler Must Gather Investigator, is a tool for examining OKD/OpenShift must-gather + records to investigate cluster autoscaler behavior and configuration.
+Steps to use with OPCT:
+
+# Extract the OPCT result file (artifacts.tar.gz)
+mkdir results && \
+tar xfz artifacts.tar.gz -C results
+
+# Extract the must-gather (requires xz)
+mkdir results/must-gather && \
+tar xfJ results/plugins/99-openshift-artifacts-collector/results/global/artifacts_must-gather.tar.xz -C results/must-gather
+
+ ./camgi results/must-gather > results/camgi.html
+
+ ++TODO: collect the camgd.html in the artifacts plugin.
+