This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
The following commit(s) were added to refs/heads/main by this push:
new 17f479e Improve the build of skywalking-rover (#159)
17f479e is described below
commit 17f479ebcabd42bb752e65f4b44ef5dcdc38c341
Author: david <[email protected]>
AuthorDate: Wed Nov 27 15:10:03 2024 +0800
Improve the build of skywalking-rover (#159)
---
CHANGES.md | 2 ++
docker/Dockerfile.build | 4 +---
docker/Dockerfile.debug | 4 +---
scripts/build/build.mk | 4 ++--
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index a9bc2b3..1e5ea60 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -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.
diff --git a/docker/Dockerfile.build b/docker/Dockerfile.build
index 5255e42..b33f2c0 100644
--- a/docker/Dockerfile.build
+++ b/docker/Dockerfile.build
@@ -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
@@ -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"]
\ No newline at end of file
+CMD ["/skywalking-rover", "start", "--config",
"/skywalking/configs/rover_configs.yaml"]
diff --git a/docker/Dockerfile.debug b/docker/Dockerfile.debug
index 8068590..233ab94 100644
--- a/docker/Dockerfile.debug
+++ b/docker/Dockerfile.debug
@@ -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
@@ -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"]
\ No newline at end of file
+CMD ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log",
"--accept-multiclient", "exec", "/skywalking-rover", "--", "start", "--config",
"/skywalking/configs/rover_configs.yaml"]
diff --git a/scripts/build/build.mk b/scripts/build/build.mk
index 465117b..a915ec0 100644
--- a/scripts/build/build.mk
+++ b/scripts/build/build.mk
@@ -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
@@ -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