Skip to content

Commit

Permalink
Merge pull request #18882 from ioito/hotfix/qx-show-update-cmd
Browse files Browse the repository at this point in the history
fix: show update oc cmd
  • Loading branch information
zexi authored Dec 5, 2023
2 parents 1b997dc + 0e487b2 commit 821eb41
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions scripts/docker_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,50 @@ fi
cd $SRC_DIR
mkdir -p $SRC_DIR/_output

show_update_cmd() {
local component=$1
local arch=$2
local spec=$1
local name=$1
local tag=${TAG}
if [[ "$arch" == arm64 || "$component" == host-image ]]; then
tag="${tag}-$arch"
fi

case "$component" in
'apigateway')
spec='apiGateway'
;;
'apimap')
spec='apiMap'
;;
'baremetal')
spec='baremetalagent'
name='baremetal-agent'
;;
'host')
spec='hostagent'
;;
'host-deployer')
spec='hostdeployer'
;;
'region')
spec='regionServer'
;;
'region-dns')
spec='regionDNS'
;;
'vpcagent')
spec='vpcAgent'
;;
'esxi-agent')
spec='esxiagent'
;;
esac

echo "kubectl patch oc -n onecloud default --type='json' -p='[{op: replace, path: /spec/${spec}/imageName, value: ${name}},{"op": "replace", "path": "/spec/${spec}/repository", "value": "${REGISTRY}"},{"op": "add", "path": "/spec/${spec}/tag", "value": "${tag}"}]'"
}

for component in $COMPONENTS; do
if [[ $component == *cli ]]; then
echo "Please build image for climc"
Expand All @@ -261,10 +305,12 @@ for component in $COMPONENTS; do
general_build $component $arch "true"
done
make_manifest_image $component
show_update_cmd $component $ARCH
;;
*)
if [ -e "$DOCKER_DIR/Dockerfile.$component" ]; then
general_build $component $ARCH "false"
show_update_cmd $component $ARCH
fi
;;
esac
Expand Down

0 comments on commit 821eb41

Please sign in to comment.