Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS
WORKDIR /go/src/github.com/openshift/cluster-cloud-controller-manager-operator
COPY . .
RUN make build &&\
gzip /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/cloud-controller-manager-aws-tests-ext
gzip /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-aws-tests-ext &&\
gzip /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-operator-tests-ext

FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/cluster-controller-manager-operator .
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/config-sync-controllers .
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/azure-config-credentials-injector .
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/manifests manifests
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/cloud-controller-manager-aws-tests-ext.gz /usr/bin/cloud-controller-manager-aws-tests-ext.gz
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-aws-tests-ext.gz /usr/bin/cloud-controller-manager-aws-tests-ext.gz
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-operator-tests-ext.gz /usr/bin/cloud-controller-manager-operator-tests-ext.gz

LABEL io.openshift.release.operator true
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
CONTROLLER_GEN = go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-tools/cmd/controller-gen
ENVTEST = go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest
GOLANGCI_LINT = go run ${PROJECT_DIR}/vendor/github.com/golangci/golangci-lint/v2/cmd/golangci-lint
REPO_PATH ?= github.com/openshift/cluster-cloud-controller-manager-operator

HOME ?= /tmp/kubebuilder-testing
ifeq ($(HOME), /)
Expand Down Expand Up @@ -37,7 +38,8 @@ unit:
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(PROJECT_DIR)/bin --index https://raw.githubusercontent.com/openshift/api/master/envtest-releases.yaml)" ./hack/ci-test.sh

# Build operator binaries
build: operator config-sync-controllers azure-config-credentials-injector cloud-controller-manager-aws-tests-ext
.PHONY: build
build: operator config-sync-controllers azure-config-credentials-injector cloud-controller-manager-aws-tests-ext cluster-cloud-controller-manager-operator-tests-ext
Comment thread
coderabbitai[bot] marked this conversation as resolved.

operator:
go build -o bin/cluster-controller-manager-operator cmd/cluster-cloud-controller-manager-operator/main.go
Expand All @@ -49,12 +51,16 @@ azure-config-credentials-injector:
go build -o bin/azure-config-credentials-injector cmd/azure-config-credentials-injector/main.go

cloud-controller-manager-aws-tests-ext:
cd cmd/cloud-controller-manager-aws-tests-ext && \
GO111MODULE=on CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) GOPROXY=$(GOPROXY) go build \
-trimpath \
-ldflags="$(LDFLAGS)" \
-o=../../bin/cloud-controller-manager-aws-tests-ext .
cd openshift-tests/ccm-aws-tests && \
mkdir -p ../bin && \
go build $(GOGCFLAGS) -o "../bin/cloud-controller-manager-aws-tests-ext" \
-trimpath -ldflags "$(LD_FLAGS)" .

cluster-cloud-controller-manager-operator-tests-ext:
cd openshift-tests/operator-tests && \
mkdir -p ../bin && \
go build $(GOGCFLAGS) -o "../bin/cloud-controller-manager-operator-tests-ext" \
-trimpath -ldflags "$(LD_FLAGS)" .

# Run against the configured Kubernetes cluster in ~/.kube/config
run: verify manifests
Expand All @@ -67,7 +73,7 @@ manifests:
# Run go fmt against code
.PHONY: fmt
fmt:
go fmt ./...
go fmt -mod=mod ./...

# Run go vet against code
.PHONY: vet
Expand All @@ -82,9 +88,7 @@ lint:
# Run go mod
.PHONY: vendor
vendor:
go mod tidy
go mod vendor
go mod verify
hack/go-mod.sh

# Generate code
generate:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading