From a8e2bca9c0399496d73952f581e42fca40252af6 Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Thu, 20 Jul 2023 17:29:45 +0100 Subject: [PATCH] Move tilt-prepare and log-push to tools/internal Signed-off-by: killianmuldoon --- Makefile | 2 +- Tiltfile | 2 +- docs/book/src/developer/testing.md | 2 +- docs/book/src/developer/tilt.md | 2 +- docs/release/release-tasks.md | 2 +- hack/tools/{ => internal}/log-push/main.go | 0 hack/tools/{ => internal}/log-push/main_test.go | 0 hack/tools/{ => internal}/tilt-prepare/main.go | 0 8 files changed, 5 insertions(+), 5 deletions(-) rename hack/tools/{ => internal}/log-push/main.go (100%) rename hack/tools/{ => internal}/log-push/main_test.go (100%) rename hack/tools/{ => internal}/tilt-prepare/main.go (100%) diff --git a/Makefile b/Makefile index 72fdaa32b909..109764e5ac39 100644 --- a/Makefile +++ b/Makefile @@ -1287,7 +1287,7 @@ $(SETUP_ENVTEST): # Build setup-envtest from tools folder. GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(SETUP_ENVTEST_PKG) $(SETUP_ENVTEST_BIN) $(SETUP_ENVTEST_VER) $(TILT_PREPARE): $(TOOLS_DIR)/go.mod # Build tilt-prepare from tools folder. - cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/tilt-prepare sigs.k8s.io/cluster-api/hack/tools/tilt-prepare + cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/tilt-prepare sigs.k8s.io/cluster-api/hack/tools/internal/tilt-prepare $(KPROMO): GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(KPROMO_PKG) $(KPROMO_BIN) ${KPROMO_VER} diff --git a/Tiltfile b/Tiltfile index cd00fb1c0089..e93549889521 100644 --- a/Tiltfile +++ b/Tiltfile @@ -431,7 +431,7 @@ def deploy_observability(): cmd_button( "loki:import logs", - argv = ["sh", "-c", "cd ./hack/tools/log-push && go run ./main.go --log-path=$LOG_PATH"], + argv = ["sh", "-c", "cd ./hack/tools/internal/log-push && go run ./main.go --log-path=$LOG_PATH"], resource = "loki", icon_name = "import_export", text = "Import logs", diff --git a/docs/book/src/developer/testing.md b/docs/book/src/developer/testing.md index adb54a1264ac..73f6ac482658 100644 --- a/docs/book/src/developer/testing.md +++ b/docs/book/src/developer/testing.md @@ -316,7 +316,7 @@ analyzing them via Grafana. Just click on the downwards arrow, enter either a ProwJob URL, a GCS path or a local folder and click on `Import Logs`. This will retrieve the logs and push them to Loki. Alternatively, the logs can be imported via: ```bash - go run ./hack/tools/log-push --log-path= + go run ./hack/tools/internal/log-push --log-path= ``` Examples for log paths: * ProwJob URL: `https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/6189/pull-cluster-api-e2e-main/1496954690603061248` diff --git a/docs/book/src/developer/tilt.md b/docs/book/src/developer/tilt.md index 61b51b612d45..8aa1c2f96db2 100644 --- a/docs/book/src/developer/tilt.md +++ b/docs/book/src/developer/tilt.md @@ -489,4 +489,4 @@ syntax highlighting and auto-formatting. To enable it for Tiltfile a file associ 1. Set `build_engine` to `podman` in `tilt-settings.yaml` (optional, only if both Docker & podman are installed) 1. Define the env variable `DOCKER_HOST` to the right socket while running tilt (eg. `DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock tilt up`) -NB: The socket defined by `DOCKER_HOST` is used only for the `hack/tools/tilt-prepare` command, the image build is running the `podman build`/`podman push` commands. +NB: The socket defined by `DOCKER_HOST` is used only for the `hack/tools/internal/tilt-prepare` command, the image build is running the `podman build`/`podman push` commands. diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index 381fa115c884..c0ecef72f1b2 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -115,7 +115,7 @@ This comes down to changing occurrences of the old version to the new version, e 2. Remove old folders that are not used anymore in clusterctl upgrade tests. 5. Modify the test specs in `test/e2e/clusterctl_upgrade_test.go` (according to the versions we want to test described above). Please note that both `InitWithKubernetesVersion` and `WorkloadKubernetesVersion` should be the highest mgmt cluster version supported by the respective Cluster API version. -2. Update `create-local-repository.py` and `tools/tilt-prepare/main.go`: `v1.4.99` => `v1.5.99`. +2. Update `create-local-repository.py` and `tools/internal/tilt-prepare/main.go`: `v1.4.99` => `v1.5.99`. 3. Make sure all tests are green (also run `pull-cluster-api-e2e-full-main` and `pull-cluster-api-e2e-workload-upgrade-1-23-latest-main`). Prior art: diff --git a/hack/tools/log-push/main.go b/hack/tools/internal/log-push/main.go similarity index 100% rename from hack/tools/log-push/main.go rename to hack/tools/internal/log-push/main.go diff --git a/hack/tools/log-push/main_test.go b/hack/tools/internal/log-push/main_test.go similarity index 100% rename from hack/tools/log-push/main_test.go rename to hack/tools/internal/log-push/main_test.go diff --git a/hack/tools/tilt-prepare/main.go b/hack/tools/internal/tilt-prepare/main.go similarity index 100% rename from hack/tools/tilt-prepare/main.go rename to hack/tools/internal/tilt-prepare/main.go