Skip to content

Commit

Permalink
allow using args for start command in cmd_upgrade (eclipse-che#4332)
Browse files Browse the repository at this point in the history
* allow using args for start command in cmd_upgrade

for now there is no way to pass any arg to start command on upgrade, but on our prod we must skip preflight checks because they will not work due to closed ports on firewall. those changes allow using `upgrade --skip-backup --skip:preflight`
  • Loading branch information
Roman Iuvshin authored Mar 7, 2017
1 parent c2d829c commit c3f0a03
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dockerfiles/base/scripts/base/commands/cmd_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ post_cmd_upgrade() {
cmd_upgrade() {
CHE_IMAGE_VERSION=$(get_image_version)
DO_BACKUP="true"
ARGS=""

while [ $# -gt 0 ]; do
case $1 in
--skip-backup)
DO_BACKUP="false"
shift ;;
*) error "Unknown parameter: $1; did you mean --skip-backup?" ; return 2 ;;
esac
for var in $@; do
if [[ "$var" == *"--skip-backup"* ]]; then
DO_BACKUP="false"
continue
fi
ARGS+="$var "
done

# If we got here, this means:
Expand Down Expand Up @@ -73,5 +73,5 @@ cmd_upgrade() {
info "upgrade" "Reinitializing the system with your configuration..."
cmd_lifecycle init --accept-license --reinit

cmd_lifecycle start
cmd_lifecycle start ${ARGS}
}

0 comments on commit c3f0a03

Please sign in to comment.