Skip to content

Commit

Permalink
Merge pull request kosmos-io#787 from OrangeBao/release_v0.5.5
Browse files Browse the repository at this point in the history
cherry-pick: Reduce the size of the node agent image
  • Loading branch information
duanmengkk authored Dec 25, 2024
2 parents 65f27bd + 2278378 commit 90f5063
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ function build_binary_for_platform() {
-ldflags "${LDFLAGS:-}" \
-o "_output/bin/${platform}/$target" \
"${target_pkg}"
# copy file
echo "${REPO_ROOT}/hack/node-agent" "_output/bin/${platform}/$target"
mkdir -p "_output/bin/${platform}/agent"
cp "${REPO_ROOT}/hack/node-agent"/* "_output/bin/${platform}/agent"
cp "_output/bin/${platform}/$target" "_output/bin/${platform}/agent"
cd "_output/bin/${platform}" && tar -czvf "agent.tar.gz" "agent"
# copy file for node-agent
if [[ "${target}" == "node-agent" ]]; then
echo "${REPO_ROOT}/hack/node-agent" "_output/bin/${platform}/$target"
mkdir -p "_output/bin/${platform}/agent"
cp "${REPO_ROOT}/hack/node-agent"/* "_output/bin/${platform}/agent"
cp "_output/bin/${platform}/$target" "_output/bin/${platform}/agent"
cd "_output/bin/${platform}" && tar -czvf "agent.tar.gz" "agent"
fi
set +x
}

Expand Down
Empty file modified hack/clean.sh
100644 → 100755
Empty file.

0 comments on commit 90f5063

Please sign in to comment.