Skip to content

Could you provide an option to only execute go build from operator-sdk build step? #2972

@skycmoon

Description

@skycmoon

Feature Request

Currently, operator-sdk build {image information} does two things. First go build then docker build. The problem is that I need to have to build the executable inside a dockerized container for the limitation of CI/CD infrastructure in my company.

For that reason, it would be very useful to provide an option to choose only go build, not docker build using some flag or simply operator-sdk build.

I currently have a workaround to build my project in the dockerized container. But I'm not sure this approach would be safe for the future change of operator-sdk build command.

RUN env GOOS=linux CGO_ENABLED=0 \
  go build -o ./build/_output/bin/service-deployment-operator \
  -gcflags="all=-trimpath=$(dirname $PWD)" \
  -asmflags="all=-trimpath=$(dirname $PWD)" \
  ./cmd/manager

Metadata

Metadata

Labels

triage/unresolvedIndicates an issue that can not or will not be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions