Skip to content

Commit

Permalink
Improve the build of skywalking-rover
Browse files Browse the repository at this point in the history
  • Loading branch information
tsint committed Nov 27, 2024
1 parent 6997e66 commit bcb19a1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Release Notes.
#### Features
* Separate multiple process for reading connection information in the access log module.
* Add a delay time before delete the connection in the access log module.
* Fix context structs parameters for tracepoint programs.
* Improve the build of skywalking-rover by adding some options.

#### Bug Fixes
* Fix the base image cannot run in the arm64.
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ WORKDIR /src

COPY . .

ENV CGO_ENABLED=0

RUN VERSION=$VERSION make btfgen && make linux
RUN mv /src/bin/skywalking-rover-${VERSION}-linux-* /src/bin/skywalking-rover

Expand All @@ -37,4 +35,4 @@ WORKDIR /skywalking
COPY --from=build /src/bin/skywalking-rover /
COPY --from=build /src/configs /skywalking/configs

CMD ["/skywalking-rover", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
CMD ["/skywalking-rover", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
4 changes: 1 addition & 3 deletions docker/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ WORKDIR /src

COPY . .

ENV CGO_ENABLED=0

RUN go install github.com/go-delve/delve/cmd/dlv@latest

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

EXPOSE 40000

CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log", "--accept-multiclient", "exec", "/skywalking-rover", "--", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log", "--accept-multiclient", "exec", "/skywalking-rover", "--", "start", "--config", "/skywalking/configs/rover_configs.yaml"]
4 changes: 2 additions & 2 deletions scripts/build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BINARY = skywalking-rover

OUT_DIR = bin
GO_BUILD_FLAGS = -v
GO_BUILD_FLAGS = -buildvcs=false -v
GO_BUILD_LDFLAGS = -X main.version=$(VERSION)

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

.PHONY: build
build: linux

0 comments on commit bcb19a1

Please sign in to comment.