From d99e7c53efbd1d08687b27a3d6875e91d0debf4a Mon Sep 17 00:00:00 2001 From: Aleksandr Kurlov Date: Wed, 27 Nov 2024 15:52:44 +0100 Subject: [PATCH] Update local setup doc --- .pre-commit-config.yaml | 2 +- Makefile | 2 +- README.md | 17 +++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35b1d74e7..e3ef23f62 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: language: system require_serial: true pass_filenames: true - stages: [push, manual] + stages: [pre-push, manual] files: '(openapi/.*|pkg/workers/worker_interface.go|pkg/client/ocm/id.go|pkg/client/aws/client.go|pkg/client/ocm/client.go|pkg/client/iam/client.go|pkg/services/authorization/authorization.go|pkg/services/sso/iam_service.go|pkg/client/redhatsso/client.go|pkg/auth/auth_agent_service.go|internal/dinosaur/pkg/services/observatorium_service.go|internal/dinosaur/pkg/services/cluster_placement_strategy.go|internal/dinosaur/pkg/services/cloud_providers.go|internal/dinosaur/pkg/services/clusters.go|internal/dinosaur/pkg/services/quota.go|internal/dinosaur/pkg/services/fleetshard_operator_addon.go|internal/dinosaur/pkg/services/quota_service_factory.go|internal/dinosaur/pkg/clusters/cluster_builder.go|internal/dinosaur/pkg/clusters/provider.go|internal/dinosaur/pkg/services/dinosaur.go)' - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0 diff --git a/Makefile b/Makefile index 2f68479be..e172808a4 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ setup/git/hooks: pre-commit install; \ else \ echo "Please install pre-commit: See https://pre-commit.com/index.html for installation instructions."; \ - echo "Re-run `make setup/git/hooks` setup step after pre-commit has been installed."; \ + echo "Re-run 'make setup/git/hooks' setup step after pre-commit has been installed."; \ fi # Checks if a GOPATH is set, or emits an error message diff --git a/README.md b/README.md index 1535b2ee0..387a5e479 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,10 @@ ACS fleet-manager repository for the ACS managed service. #### Prerequisites * [Golang 1.21+](https://golang.org/dl/) -* [Docker](https://docs.docker.com/get-docker/) - to create database +* [Docker](https://docs.docker.com/get-docker/) or [Podman](https://podman.io/docs/installation) - to create database * [ocm cli](https://github.com/openshift-online/ocm-cli/releases) - ocm command line tool * [Node.js v12.20+](https://nodejs.org/en/download/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +* [Java](https://openjdk.org/) - for openAPI generation * IDE with [EditorConfig](https://editorconfig.org/) support enabled: - there is a [plugin for GoLand](https://www.jetbrains.com/help/go/configuring-code-style.html#editorconfig) - there is an [extension for VSCode](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) @@ -41,6 +42,17 @@ ACS fleet-manager repository for the ACS managed service. Guide: [setup-test-environment.md](./docs/development/setup-test-environment.md#prepare-the-environment) * Setting up configurations described [here](./docs/development/populating-configuration.md#interacting-with-the-fleet-manager-api) +#### Setup pre-commit +```shell +$ make setup/git/hooks +``` + +### Test local setup +```shell +# build binaries and generate openAPI +$ make all +``` + #### Supported cluster types: * Local: Minikube, **Colima** (recommended for macOS), **Kind** (recommended for linux), Rancher Desktop, CRC @@ -77,9 +89,6 @@ $ make deploy/dev-fast #### Common make targets ```shell -# Install git-hooks, for more information see git-hooks.md [1] -$ make setup/git/hooks - # To generate code and compile binaries run $ make all