Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Makefile, make development simpler #171

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

samzong
Copy link
Member

@samzong samzong commented Jan 19, 2025

What type of PR is this?

/kind feature

❯ make help
Karmada Dashboard Makefile

Usage:
  make              - Build all binaries (same as 'make all')
  make all          - Build all binaries
  make install      - Install all dependencies
  make run          - Run both API and Web servers
  make images       - Build all Docker images

Development Commands:
  make run-api      - Run API server only
  make run-web      - Run Web server only
  make install-deps - Install Go dependencies
  make install-ui-deps - Install UI dependencies

Build Commands:
  make build        - Build all binaries
  make images       - Build all Docker images

Variables:
  KUBECONFIG       - Path to karmada kubeconfig file
  API_PORT         - API server port (default: 8000)
  API_HOST         - API server host (default: http://localhost:8000)
  GOOS             - Target OS for build
  GOARCH           - Target architecture for build

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

It is inconvenient to start the development environment locally.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 19, 2025
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 19, 2025
@samzong
Copy link
Member Author

samzong commented Jan 19, 2025

@warjiang @RainbowMango

@warjiang
Copy link
Contributor

/assign

Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@samzong
Copy link
Member Author

samzong commented Jan 20, 2025

@warjiang updated, thanks for u review,

  • add depends for task
  • add default KUBECONFIG, default use $(HOME)/.kube/karmada.config
  • add gen-token, follow DEVELOPMENT.md guide
  • add SKIP_TLS_VERIFY,default is false
  • show KARMADA_CTX and HOST_CTX, when make help.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@warjiang
Copy link
Contributor

@samzong only two problems left, thanks for your patience ~

@warjiang
Copy link
Contributor

btw, the .api.pid should be ignored by git

@samzong
Copy link
Member Author

samzong commented Jan 20, 2025

@warjiang
Copy link
Contributor

/lgtm
/approve
good job 👍

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2025
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: warjiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2025
@karmada-bot karmada-bot merged commit 49b5a6d into karmada-io:main Jan 20, 2025
6 checks passed
Comment on lines -52 to -57
bin-karmada-dashboard-web:
BUILD_PLATFORMS=$(GOOS)/$(GOARCH) hack/build.sh karmada-dashboard-web
image-karmada-dashboard-web:
BUILD_PLATFORMS=linux/$(GOARCH) hack/build.sh karmada-dashboard-web
cp -R ui/apps/dashboard/dist _output/bin/linux/$(GOARCH)/dist
DOCKER_FILE="build-web.Dockerfile" VERSION=$(VERSION) REGISTRY=$(REGISTRY) BUILD_PLATFORMS=linux/$(GOARCH) hack/docker.sh karmada-dashboard-web
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the CI workflow:

  make bin-***-dashboard-web
  shell: /usr/bin/bash -e {0}
  env:
    IMAGE_NAME: ***/***-dashboard-web
    BINARY_NAME: ***-dashboard-web
make: *** No rule to make target 'bin-***-dashboard-web'.  Stop.
Error: Process completed with exit code 2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants