Skip to content

Commit 4579920

Browse files
*: integrate the copy-content binary
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 84dccf9 commit 4579920

File tree

5 files changed

+49
-4
lines changed

5 files changed

+49
-4
lines changed

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ifeq (, $(wildcard $(KUBEBUILDER_ASSETS)/kube-apiserver))
5555
$(error kube-apiserver $(KUBEBUILDER_ASSETS_ERR))
5656
endif
5757

58-
build: $(REGISTRY_CMDS) $(OLM_CMDS) $(OPM) ## build opm and olm binaries
58+
build: $(REGISTRY_CMDS) $(OLM_CMDS) $(OPM) bin/copy-content ## build opm and olm binaries
5959

6060
build/opm:
6161
$(MAKE) $(OPM)
@@ -64,7 +64,7 @@ build/registry:
6464
$(MAKE) $(REGISTRY_CMDS) $(OPM)
6565

6666
build/olm:
67-
$(MAKE) $(PSM_CMD) $(OLM_CMDS) $(COLLECT_PROFILES_CMD)
67+
$(MAKE) $(PSM_CMD) $(OLM_CMDS) $(COLLECT_PROFILES_CMD) bin/copy-content
6868

6969
$(OPM): version_flags=-ldflags "-X '$(REGISTRY_PKG)/cmd/opm/version.gitCommit=$(GIT_COMMIT)' -X '$(REGISTRY_PKG)/cmd/opm/version.opmVersion=$(OPM_VERSION)' -X '$(REGISTRY_PKG)/cmd/opm/version.buildDate=$(BUILD_DATE)'"
7070
$(OPM):
@@ -104,6 +104,9 @@ bin/kubebuilder:
104104
bin/cpb: FORCE
105105
CGO_ENABLED=0 go build $(GO_BUILD_OPTS) -ldflags '-extldflags "-static"' -o $@ github.com/operator-framework/operator-lifecycle-manager/util/cpb
106106

107+
bin/copy-content: FORCE
108+
CGO_ENABLED=0 go build $(GO_BUILD_OPTS) -ldflags '-extldflags "-static"' -o $@ github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content
109+
107110
unit/olm: bin/kubebuilder
108111
@echo "Running the OLM unit tests"
109112
$(MAKE) unit WHAT=operator-lifecycle-manager

cmds.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmds
22

33
import (
44
_ "github.com/operator-framework/operator-lifecycle-manager/cmd/catalog"
5+
_ "github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content"
56
_ "github.com/operator-framework/operator-lifecycle-manager/cmd/olm"
67
_ "github.com/operator-framework/operator-lifecycle-manager/cmd/package-server"
78
_ "github.com/operator-framework/operator-lifecycle-manager/util/cpb"

operator-lifecycle-manager.Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ ENV GO111MODULE auto
44
ENV GOPATH /go
55
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
66

7-
# Permit the cpb binary to be compiled statically. The Red Hat compiler
7+
# Permit the cpb and copy-content binaries to be compiled statically. The Red Hat compiler
88
# provided by ART will otherwise force FIPS compliant dynamic compilation.
9-
ENV GO_COMPLIANCE_EXCLUDE="build.*operator-lifecycle-manager/util/cpb"
9+
ENV GO_COMPLIANCE_EXCLUDE="build.*operator-lifecycle-manager/(util/cpb|cmd/copy-content)"
1010

1111
WORKDIR /build
1212

@@ -30,6 +30,7 @@ COPY --from=builder /build/bin/collect-profiles /bin/collect-profiles
3030
COPY --from=builder /build/bin/package-server /bin/package-server
3131
COPY --from=builder /build/bin/cpb /bin/cpb
3232
COPY --from=builder /build/bin/psm /bin/psm
33+
COPY --from=builder /build/bin/copy-content /bin/copy-content
3334

3435
# This image doesn't need to run as root user.
3536
USER 1001

vendor/github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content/main.go

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

+1
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ github.com/operator-framework/api/pkg/validation/internal
663663
# github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000 => ./staging/operator-lifecycle-manager
664664
## explicit; go 1.20
665665
github.com/operator-framework/operator-lifecycle-manager/cmd/catalog
666+
github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content
666667
github.com/operator-framework/operator-lifecycle-manager/cmd/olm
667668
github.com/operator-framework/operator-lifecycle-manager/cmd/package-server
668669
github.com/operator-framework/operator-lifecycle-manager/pkg/api/client

0 commit comments

Comments
 (0)