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: 0 additions & 6 deletions Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ COPY ./ ./
ARG ARCH
ARG ldflags

WORKDIR /workspace/openshift
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
go build -ldflags "${ldflags} -extldflags '-static'" \
-o ../infracluster-controller cmd/manager.go

WORKDIR /workspace
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
go build -ldflags "${ldflags} -extldflags '-static'" \
Expand All @@ -41,7 +36,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
FROM registry.ci.openshift.org/ocp/4.21:base-rhel9
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/infracluster-controller .
COPY ./openshift/manifests ./manifests

# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 0 additions & 187 deletions openshift/.golangci.yml

This file was deleted.

30 changes: 6 additions & 24 deletions openshift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,19 @@ endef

manifest_names = 00_credentials-request 04_infrastructure-components
infrastructure_components = kustomize/cluster-capi-configmap/infrastructure-components.yaml
infracluster_role = kustomize/infracluster-controller/role.yaml

.PHONY: generate
generate: $(foreach m,$(manifest_names),$(call manifest_name,$(m)))

$(call manifest_name,00_credentials-request): $(KUSTOMIZE) ALWAYS | $(manifests_dir)
$(KUSTOMIZE) build kustomize/credentials-request > $@

$(infrastructure_components): $(KUSTOMIZE) $(infracluster_role) ALWAYS
$(infrastructure_components): $(KUSTOMIZE) ALWAYS
$(KUSTOMIZE) build kustomize/infrastructure-components > $@

$(call manifest_name,04_infrastructure-components): $(KUSTOMIZE) $(infrastructure_components) ALWAYS | $(manifests_dir)
$(KUSTOMIZE) build kustomize/cluster-capi-configmap > $@

$(infracluster_role): $(CONTROLLER_GEN) ALWAYS
$(CONTROLLER_GEN) rbac:roleName=infracluster-controller paths=./pkg/infraclustercontroller output:stdout > $@

$(manifests_dir):
mkdir -p $@

Expand All @@ -52,36 +48,22 @@ $(KUSTOMIZE):
$(CONTROLLER_GEN):
$(MAKE) -C $(TOOLS_DIR) bin/controller-gen

$(GOLANGCI_LINT):
$(MAKE) -C $(TOOLS_DIR) bin/golangci-lint

.PHONY: verify
verify: lint modules generate
verify: generate
@if !(git diff --quiet HEAD); then \
git diff; \
echo "generated files are out of date, run make generate"; exit 1; \
fi

.PHONY: lint
lint: $(GOLANGCI_LINT) ## Lint codebase
$(GOLANGCI_LINT) run -v --fast=false

.PHONY: lint-update
lint-update: $(GOLANGCI_LINT) ## Lint codebase
$(GOLANGCI_LINT) run -v --fast=false --fix

.PHONY: modules
modules:
go mod tidy
go mod vendor

# FIXME(stephenfin): Remove the CI job that relies on this: all logic has moved to CCAPIO now
.PHONY: test
test:
go test $(shell go list ./... | grep -v /e2e)
echo "done"

# FIXME(stephenfin): Remove this once we've reworked the CI job that relies on this to call the script directly
.PHONY: e2e
e2e:
./hack/test.sh "./e2e/..." 30m
./e2e-tests.sh

.PHONY: ALWAYS
ALWAYS:
Loading