Skip to content

Commit 17f479e

Browse files
authored
Improve the build of skywalking-rover (#159)
1 parent 6997e66 commit 17f479e

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Release Notes.
77
#### Features
88
* Separate multiple process for reading connection information in the access log module.
99
* Add a delay time before delete the connection in the access log module.
10+
* Fix context structs parameters for tracepoint programs.
11+
* Improve the build of skywalking-rover by adding some options.
1012

1113
#### Bug Fixes
1214
* Fix the base image cannot run in the arm64.

docker/Dockerfile.build

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ WORKDIR /src
2323

2424
COPY . .
2525

26-
ENV CGO_ENABLED=0
27-
2826
RUN VERSION=$VERSION make btfgen && make linux
2927
RUN mv /src/bin/skywalking-rover-${VERSION}-linux-* /src/bin/skywalking-rover
3028

@@ -37,4 +35,4 @@ WORKDIR /skywalking
3735
COPY --from=build /src/bin/skywalking-rover /
3836
COPY --from=build /src/configs /skywalking/configs
3937

40-
CMD ["/skywalking-rover", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
38+
CMD ["/skywalking-rover", "start", "--config", "/skywalking/configs/rover_configs.yaml"]

docker/Dockerfile.debug

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ WORKDIR /src
2323

2424
COPY . .
2525

26-
ENV CGO_ENABLED=0
27-
2826
RUN go install github.com/go-delve/delve/cmd/dlv@latest
2927

3028
RUN VERSION=$VERSION make generate && make linux
@@ -42,4 +40,4 @@ COPY --from=build /src/configs /skywalking/configs
4240

4341
EXPOSE 40000
4442

45-
CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log", "--accept-multiclient", "exec", "/skywalking-rover", "--", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
43+
CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log", "--accept-multiclient", "exec", "/skywalking-rover", "--", "start", "--config", "/skywalking/configs/rover_configs.yaml"]

scripts/build/build.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
BINARY = skywalking-rover
2020

2121
OUT_DIR = bin
22-
GO_BUILD_FLAGS = -v
22+
GO_BUILD_FLAGS = -buildvcs=false -v
2323
GO_BUILD_LDFLAGS = -X main.version=$(VERSION)
2424

2525
PLATFORMS := linux
@@ -36,7 +36,7 @@ deps:
3636
.PHONY: $(PLATFORMS)
3737
$(PLATFORMS): deps
3838
mkdir -p $(OUT_DIR)
39-
GOOS=$(os) GOARCH=$(ARCH) $(GO_BUILD) $(GO_BUILD_FLAGS) -ldflags "$(GO_BUILD_LDFLAGS)" -o $(OUT_DIR)/$(BINARY)-$(VERSION)-$(os)-$(ARCH) ./cmd
39+
CGO_ENABLED=0 GOOS=$(os) GOARCH=$(ARCH) $(GO_BUILD) $(GO_BUILD_FLAGS) -ldflags "$(GO_BUILD_LDFLAGS)" -o $(OUT_DIR)/$(BINARY)-$(VERSION)-$(os)-$(ARCH) ./cmd
4040

4141
.PHONY: build
4242
build: linux

0 commit comments

Comments
 (0)