chore: add more commands and refactor makefiles#113
Conversation
youngnick
left a comment
There was a problem hiding this comment.
I think this looks pretty good overall, just needs a little more explanation so that people understand how the dynamic target building works.
|
Hi @youngnick, thanks for your kind reviews, more comments have been added. |
4eb6395 to
9dec06e
Compare
Codecov Report
@@ Coverage Diff @@
## main #113 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 5 5
=========================================
Hits 5 5 Continue to review full report at Codecov.
|
e04a5fc to
2e86274
Compare
|
@Xunzhuo can you respond to the review comments so this PR can proceed? |
Okay, I will work on this today. |
|
@Xunzhuo the PR is now failing CI, PTAL. |
21aee1a to
58f0e79
Compare
|
Hi, CI has passed and reviews have been resolved. @arkodg |
There was a problem hiding this comment.
looks like this wasn't reverted and bin/tmp is still being created
There was a problem hiding this comment.
How about deleting bin/tmp automatically after building image?
There was a problem hiding this comment.
the previous steps were one liners so prefer it over this
* re add the kube make targets that were accidently removed as part of envoyproxy#113 * rm implementation for image.multiarch, which needs work * rm Makefile.targets.mk and reuse tools/make/common.mk * move top level targets to the right makefiles * move `make help` strings closer to the target ``` Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway Usage: make <Targets> <Options> ... Targets: Usage: make <target> Golang build Build envoy-gateway for host platform. See Option PLATFORM and BINS. test Run all Go test of code sources. format Format codes style with mod tidy, gofmt and goimports. clean Remove all files that are created during builds. Image image Build docker images for host platform. See Option PLATFORM and BINS. push Push docker images to registry. Lint lint Run all linter of code sources, including golint, yamllint and codespell. Kubernetes Development manifests Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. generate Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. kube-test Run Kubernetes provider tests. Kubernetes Deployment kube-install Install CRDs into the Kubernetes cluster specified in ~/.kube/config. kube-uninstall Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. Kubernetes Build Dependencies kustomize Download kustomize locally if necessary. controller-gen Download controller-gen locally if necessary. envtest Download envtest-setup locally if necessary. Options: BINS The binaries to build. Default is all of cmd. This option is available when using: make build/build.multiarch Example: make build BINS="envoy-gateway" IMAGES Backend images to make. Default is all of cmds. This option is available when using: make image/image.multiarch/push/push.multiarch Example: make image.multiarch IMAGES="envoy-gateway" PLATFORM The specified platform to build. This option is available when using: make build/image Example: make build BINS="envoy-gateway" PLATFORM="linux_amd64" Supported Platforms: linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 PLATFORMS The multiple platforms to build. This option is available when using: make build.multiarch Example: make image.multiarch IMAGES="envoy-gateway" PLATFORMS="linux_amd64 linux_arm64" Default is "linux_amd64 linux_arm64 darwin_amd64 darwin_arm64". ``` Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* re add the kube make targets that were accidently removed as part of #113 * rm implementation for image.multiarch, which needs work * rm Makefile.targets.mk and reuse tools/make/common.mk * move top level targets to the right makefiles * move `make help` strings closer to the target ``` Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway Usage: make <Targets> <Options> ... Targets: Usage: make <target> Golang build Build envoy-gateway for host platform. See Option PLATFORM and BINS. test Run all Go test of code sources. format Format codes style with mod tidy, gofmt and goimports. clean Remove all files that are created during builds. Image image Build docker images for host platform. See Option PLATFORM and BINS. push Push docker images to registry. Lint lint Run all linter of code sources, including golint, yamllint and codespell. Kubernetes Development manifests Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. generate Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. kube-test Run Kubernetes provider tests. Kubernetes Deployment kube-install Install CRDs into the Kubernetes cluster specified in ~/.kube/config. kube-uninstall Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. Kubernetes Build Dependencies kustomize Download kustomize locally if necessary. controller-gen Download controller-gen locally if necessary. envtest Download envtest-setup locally if necessary. Options: BINS The binaries to build. Default is all of cmd. This option is available when using: make build/build.multiarch Example: make build BINS="envoy-gateway" IMAGES Backend images to make. Default is all of cmds. This option is available when using: make image/image.multiarch/push/push.multiarch Example: make image.multiarch IMAGES="envoy-gateway" PLATFORM The specified platform to build. This option is available when using: make build/image Example: make build BINS="envoy-gateway" PLATFORM="linux_amd64" Supported Platforms: linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 PLATFORMS The multiple platforms to build. This option is available when using: make build.multiarch Example: make image.multiarch IMAGES="envoy-gateway" PLATFORMS="linux_amd64 linux_arm64" Default is "linux_amd64 linux_arm64 darwin_amd64 darwin_arm64". ``` Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* .gitignore: Begone with pointless **/ Entries in .gitignore aren't rooted unless they start with "/", so a leading "**/" is pointless. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: Turn off intermediate file removal Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: Don't use recursive Make Arko had trouble with this, because variables were being used before they were defined. In order to make those errors easy to debug, I tacked on --warn-undefined-variables so that these things get called out. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: Don't hide what commands are running Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * .github: Refactor a bit, splitting things up Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys, .github: Have CI use the combined `make lint` Rather tha calling each individually. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: make lint: Restore integration with GitHub Actions annotations This was dropped in 80b78e5 AKA #113 Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: Introduce tools.mk to manage required tools Signed-off-by: Luke Shumaker <lukeshu@datawire.io> * build-sys: Begone with MAKE_IN_DOCKER Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Xunzhuo mixdeers@gmail.com