add dinghy deprecation warning to docker dev setup script

Since Dinghy is currently deprecated show a deprecation warning
in case the local docker dev setup script is executed using
dinghy

refs DE-721

test-plan:
- build passes
- docker_dev_setup shows warning deprecation message if executed
with dinghy
- docker_dev_setup does not show deprecation message if executed
with mutagen

Change-Id: Ie84804f3e3012741c7be9c4622557e0c8d003d82
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267421
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
This commit is contained in:
Andrea Cirulli 2021-06-21 13:22:03 -05:00
parent 1a34708e4a
commit 775fc1d63f
2 changed files with 9 additions and 0 deletions

View File

@ -5,8 +5,11 @@ source script/common/utils/common.sh
DINGHY_MEMORY='8192'
DINGHY_CPUS='4'
DINGHY_DISK='150'
DINGHY_DEPRECATION_MESSAGE="WARNING: Dinghy is currently deprecated, we suggest to use mutagen instead.
For further information check the confluence page: https://instructure.atlassian.net/wiki/spaces/CE/pages/4334256157/Canvas+LMS+docker+dev+Installation+Update"
function create_dinghy_vm {
warning_message $DINGHY_DEPRECATION_MESSAGE
if ! dinghy status | grep -q 'not created'; then
# make sure DOCKER_MACHINE_NAME is set
eval "$(dinghy env)"

View File

@ -18,6 +18,7 @@
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
YELLOW=$(tput setaf 3)
function is_logfile_enabled() {
[[ -n "${LOG:-}" ]] && touch "$LOG"
@ -57,6 +58,11 @@ function message {
echo_console_and_log "$BOLD> $*$NORMAL"
}
function warning_message {
echo_console_and_log ''
echo_console_and_log "$BOLD$YELLOW> $*$NORMAL"
}
function prompt {
# for some reason read output is sent to stderr
# to avoid conflicts with untracked failure detection