stolostron / multicloud-operators-foundation

Apache License 2.0
51 stars 35 forks source link

Refactor: change to use the same kustomize as ocm and other repos do. #789

Closed xuezhaojun closed 1 week ago

xuezhaojun commented 2 weeks ago

The old ensure-kustomize does't support run e2e on macos:

curl -s -f -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv3.5.4/kustomize_v3.5.4_darwin_arm64.tar.gz -o '_output/tools/bin/kustomize_v3.5.4_darwin_arm64.tar.gz'
make: *** [ensure-kustomize] Error 56

The result of change:

➜  multicloud-operators-foundation git:(refactor-ensure-kustomize) make ensure-kustomize
vendor/github.com/openshift/build-machinery-go/make/targets/openshift/imagebuilder.mk:21: warning: overriding commands for target `ensure-imagebuilder'
vendor/github.com/openshift/build-machinery-go/make/targets/openshift/imagebuilder.mk:21: warning: ignoring old commands for target `ensure-imagebuilder'
Installing kustomize into '_output/tools/bin/kustomize-4.1.3'
mkdir -p '_output/tools/bin/'
rm -f _output/tools/bin//kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/kustomize/v4.1.3/hack/install_kustomize.sh"  | bash -s 4.1.3 _output/tools/bin/
{Version:kustomize/v4.1.3 GitCommit:0f614e92f72f1b938a9171b964d90b197ca8fb68 BuildDate:2021-05-20T20:52:40Z GoOs:darwin GoArch:amd64}
kustomize installed to /Users/zxue/workspaces/multicloud-operators-foundation/_output/tools/bin/kustomize
mv _output/tools/bin//kustomize _output/tools/bin/kustomize-4.1.3
xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/retest

xuezhaojun commented 1 week ago

/assign @zhujian7

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

zhujian7 commented 1 week ago

after the change, will use the global customize?

xuezhaojun commented 1 week ago

after the change, will use the global customize?

No, the openshift kustomize.mk will install kustomize in _output dir, as ocm repo: https://github.com/open-cluster-management-io/ocm/blob/67b4f1a3547da422b626bd5b84f6f82072363ef6/test/e2e-test.mk#L3

The result of make ensure-kustomize after change:

➜  multicloud-operators-foundation git:(refactor-ensure-kustomize) make ensure-kustomize
vendor/github.com/openshift/build-machinery-go/make/targets/openshift/imagebuilder.mk:21: warning: overriding commands for target `ensure-imagebuilder'
vendor/github.com/openshift/build-machinery-go/make/targets/openshift/imagebuilder.mk:21: warning: ignoring old commands for target `ensure-imagebuilder'
Installing kustomize into '_output/tools/bin/kustomize-4.1.3'
mkdir -p '_output/tools/bin/'
rm -f _output/tools/bin//kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/kustomize/v4.1.3/hack/install_kustomize.sh"  | bash -s 4.1.3 _output/tools/bin/
{Version:kustomize/v4.1.3 GitCommit:0f614e92f72f1b938a9171b964d90b197ca8fb68 BuildDate:2021-05-20T20:52:40Z GoOs:darwin GoArch:amd64}
kustomize installed to /Users/zxue/workspaces/multicloud-operators-foundation/_output/tools/bin/kustomize
mv _output/tools/bin//kustomize _output/tools/bin/kustomize-4.1.3
zhujian7 commented 1 week ago

/lgtm

openshift-ci[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xuezhaojun, zhujian7

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: - ~~[OWNERS](https://github.com/stolostron/multicloud-operators-foundation/blob/main/OWNERS)~~ [zhujian7] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment