[#7] 统一构建镜像脚本包含master
This commit is contained in:
@@ -21,6 +21,7 @@ EOF
|
||||
}
|
||||
|
||||
use_intranet=false
|
||||
build_master=true
|
||||
build_master_offline=false
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@@ -29,7 +30,12 @@ while [[ $# -gt 0 ]]; do
|
||||
use_intranet=true
|
||||
shift
|
||||
;;
|
||||
--master)
|
||||
build_master=true
|
||||
shift
|
||||
;;
|
||||
--master-offline)
|
||||
build_master=true
|
||||
build_master_offline=true
|
||||
shift
|
||||
;;
|
||||
@@ -142,11 +148,23 @@ fi
|
||||
|
||||
echo ""
|
||||
|
||||
if [[ "$build_master_offline" == true ]]; then
|
||||
echo "🏗️ Building master offline image"
|
||||
if [[ "$build_master" == true ]]; then
|
||||
echo ""
|
||||
echo "🔄 Building Master image..."
|
||||
pushd "$master_root" >/dev/null
|
||||
if ./scripts/build_images.sh --offline --tag argus-master:offline; then
|
||||
images_built+=("argus-master:offline")
|
||||
master_args=("--tag" "argus-master:latest")
|
||||
if [[ "$use_intranet" == true ]]; then
|
||||
master_args+=("--intranet")
|
||||
fi
|
||||
if [[ "$build_master_offline" == true ]]; then
|
||||
master_args+=("--offline")
|
||||
fi
|
||||
if ./scripts/build_images.sh "${master_args[@]}"; then
|
||||
if [[ "$build_master_offline" == true ]]; then
|
||||
images_built+=("argus-master:offline")
|
||||
else
|
||||
images_built+=("argus-master:latest")
|
||||
fi
|
||||
else
|
||||
build_failed=true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user