Skip to content

build: Use new clusterctl-aws name for clusterawsadm #863

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

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"yamale@latest",
"yamllint@latest",
"yq-go@latest",
"path:./hack/flakes#clusterawsadm",
"path:./hack/flakes#clusterctl",
"path:./hack/flakes#clusterctl-aws",
"path:./hack/flakes#controller-gen",
"path:./hack/flakes#go-mod-upgrade",
"path:./hack/flakes#golangci-lint",
Expand Down
26 changes: 16 additions & 10 deletions hack/flakes/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
ldflags = [ "-s" "-w" ];
};

clusterawsadm = buildGo122Module rec {
name = "clusterawsadm";
clusterctl-aws = buildGo122Module rec {
name = "clusterctl-aws";
version = "2.6.1";
src = fetchFromGitHub {
owner = "kubernetes-sigs";
Expand All @@ -69,17 +69,23 @@
doCheck = false;
subPackages = [ "cmd/clusterawsadm" ];
vendorHash = "sha256-WRKViPMlJVV3uS+TK6Rd4EoEQ5ttdXDoOqoYiuga1WE=";
ldflags = let t = "sigs.k8s.io/cluster-api-provider-aws/v2/version"; in [
ldflags = let modPrefix = "sigs.k8s.io/cluster-api-provider-aws/v2";
v = "${modPrefix}/version";
c = "${modPrefix}/cmd/clusterawsadm/cmd/version"; in [
"-s"
"-w"
"-X" "${t}.gitVersion=v${version}"
"-X" "${t}.gitCommit=v${version}"
"-X" "${t}.gitReleaseCommit=v${version}"
"-X" "${t}.gitMajor=${lib.versions.major version}"
"-X" "${t}.gitMinor=${lib.versions.minor version}"
"-X" "${t}.buildDate=19700101-00:00:00"
"-X" "${t}.gitTreeState=clean"
"-X" "${v}.gitVersion=v${version}"
"-X" "${v}.gitCommit=v${version}"
"-X" "${v}.gitReleaseCommit=v${version}"
"-X" "${v}.gitMajor=${lib.versions.major version}"
"-X" "${v}.gitMinor=${lib.versions.minor version}"
"-X" "${v}.buildDate=19700101-00:00:00"
"-X" "${v}.gitTreeState=clean"
"-X" "${c}.CLIName=clusterctl-aws"
];
preInstall = ''
mv $GOPATH/bin/clusterawsadm $GOPATH/bin/clusterctl-aws
'';
};

release-please = buildNpmPackage rec {
Expand Down
2 changes: 1 addition & 1 deletion make/clusterctl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clusterctl.init:
EXP_RUNTIME_SDK=true \
EXP_CLUSTER_RESOURCE_SET=true \
EXP_MACHINE_POOL=true \
AWS_B64ENCODED_CREDENTIALS=$$(clusterawsadm bootstrap credentials encode-as-profile) \
AWS_B64ENCODED_CREDENTIALS=$$(clusterctl-aws bootstrap credentials encode-as-profile) \
NUTANIX_ENDPOINT="" NUTANIX_PASSWORD="" NUTANIX_USER="" \
clusterctl init \
--kubeconfig=$(KIND_KUBECONFIG) \
Expand Down
2 changes: 1 addition & 1 deletion make/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dev.update-webhook-image-on-kind:
.PHONY: dev.update-bootstrap-credentials-aws
dev.update-bootstrap-credentials-aws: export KUBECONFIG := $(KIND_KUBECONFIG)
dev.update-bootstrap-credentials-aws:
kubectl patch secret capa-manager-bootstrap-credentials -n capa-system -p="{\"data\":{\"credentials\": \"$$(clusterawsadm bootstrap credentials encode-as-profile)\"}}"
kubectl patch secret capa-manager-bootstrap-credentials -n capa-system -p="{\"data\":{\"credentials\": \"$$(clusterctl-aws bootstrap credentials encode-as-profile)\"}}"
kubectl rollout restart deployment capa-controller-manager -n capa-system
kubectl rollout status deployment capa-controller-manager -n capa-system

Expand Down
2 changes: 1 addition & 1 deletion make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ endif
$(info $(M) $(if $(filter $(E2E_DRYRUN), true),dry-,)running e2e tests$(if $(E2E_LABEL), labelled "$(E2E_LABEL)")$(if $(E2E_FOCUS), matching "$(E2E_FOCUS)"))
env E2E_IMAGE_TAG="$$(gojq --raw-output '.version+"-"+.runtime.goarch' $(REPO_ROOT)/dist/metadata.json)" \
envsubst -no-unset -no-empty -i '$(E2E_CONF_FILE)' -o '$(E2E_CONF_FILE_ENVSUBST)'
env AWS_B64ENCODED_CREDENTIALS="$$(clusterawsadm bootstrap credentials encode-as-profile 2>/dev/null)" \
env AWS_B64ENCODED_CREDENTIALS="$$(clusterctl-aws bootstrap credentials encode-as-profile 2>/dev/null)" \
ginkgo run \
--r \
--show-node-events \
Expand Down
Loading