Skip to content

Commit

Permalink
feat: disable cgo
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Sep 4, 2023
1 parent c7d98ae commit 22f5f55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v1

- name: Build
run: go install -v ./...
run: CGO_ENABLED=0 go install -v ./...

- name: Unit Test
run: make unit-test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE_NAME:=$(IMAGE_REGISTRY)/$(IMAGE)
export GO111MODULE=on

build:
go build -o build/_output/bin/vitess-operator ./cmd/manager
CGO_ENABLED=0 go build -o build/_output/bin/vitess-operator ./cmd/manager

# Release build is slow but self-contained (doesn't depend on anything in your
# local machine). We use this for automated builds that we publish.
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM golang:1.21.0 AS build
ENV GO111MODULE=on
WORKDIR /go/src/planetscale.dev/vitess-operator
COPY . /go/src/planetscale.dev/vitess-operator
RUN go install /go/src/planetscale.dev/vitess-operator/cmd/manager
RUN CGO_ENABLED=0 go install /go/src/planetscale.dev/vitess-operator/cmd/manager

# The rest is meant to mimic the output from operator-sdk's Dockerfile.
# We just copy the binary we built inside Docker instead of from outside.
Expand Down

0 comments on commit 22f5f55

Please sign in to comment.