Repository navigation
Expand file tree
/
Copy pathbuild.sh
More file actions
84 lines (69 loc) · 2.45 KB
/
Copy pathbuild.sh
File metadata and controls
84 lines (69 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env bash
# Copyright (c) 2025-2026 Huawei Technologies Co., Ltd. All rights reserved.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEPLOYMENT_COMMON="$SCRIPT_DIR/deploy/common/common.sh"
if [ -f "$DEPLOYMENT_COMMON" ]; then
# shellcheck source=/dev/null
source "$DEPLOYMENT_COMMON"
fi
[ -n "${DEPLOYMENT_LANGUAGE:-}" ] || DEPLOYMENT_LANGUAGE="en"
usage() {
if [ "$DEPLOYMENT_LANGUAGE" = "zh" ]; then
cat <<'USAGE'
用法:
bash build.sh [镜像构建选项]
bash build.sh --package [离线包构建选项]
镜像构建会转发到:deploy/images/build.sh
离线包构建会转发到:deploy/offline/build_offline_package.sh
常用示例:
bash build.sh --all --version latest --dry-run
bash build.sh --images runtime,management --version latest --load
bash build.sh --mcp --ops --version latest --load
bash build.sh --package --version latest --target docker --dry-run
更多选项和可用镜像:
bash deploy/images/build.sh --help
bash deploy/offline/build_offline_package.sh --help
USAGE
return
fi
cat <<'USAGE'
Usage:
bash build.sh [image build options]
bash build.sh --package [offline package options]
Image builds are forwarded to: deploy/images/build.sh
Offline package builds are forwarded to: deploy/offline/build_offline_package.sh
Available image names for --images LIST:
management nexent/nexent-management
runtime nexent/nexent-runtime
ops nexent/nexent-ops
gateway nexent/nexent-gateway
web nexent/nexent-web
data-process nexent/nexent-data-process
mcp nexent/nexent-mcp (proxy)
terminal nexent/nexent-ubuntu-terminal
docs nexent/nexent-docs
sandbox nexent/nexent-sandbox
sandbox-full nexent/nexent-sandbox-full
all Build the images above, excluding sandbox-full
Examples:
bash build.sh --all --version latest --dry-run
bash build.sh --images runtime,management --version latest --load
bash build.sh --mcp --ops --version latest --load # MCP backend, proxy and Ops
bash build.sh --package --version latest --target docker --dry-run
More options:
bash deploy/images/build.sh --help
bash deploy/offline/build_offline_package.sh --help
USAGE
}
case "${1:-}" in
--help|-h)
usage
exit 0
;;
esac
if [ "${1:-}" = "--package" ]; then
shift
exec bash "$SCRIPT_DIR/deploy/offline/build_offline_package.sh" "$@"
fi
exec bash "$SCRIPT_DIR/deploy/images/build.sh" "$@"