diff --git a/broker.sh b/broker.sh index 23552b6..77fb269 100755 --- a/broker.sh +++ b/broker.sh @@ -318,9 +318,9 @@ export_env () { local lines=() readarray -t lines < <(get_data_array etc environment) for line in "${lines[@]}"; do - if [[ $TESTING_MODE == "TRUE" ]]; then - echo export $line - fi + #if [[ $TESTING_MODE == "TRUE" ]]; then + # echo export $line + #fi export $line done } @@ -1148,6 +1148,24 @@ docker_run_from_data_on_host () { fi } +docker_destroy_from_data_on_host () { + local host=$1 + shift + local dealkeypath="$*" + # env exported here since this is for bootstrapping + export_env + if construct_deal_info $dealkeypath; then + pr_vars deal_name docker_image + if [[ $TESTING_MODE == "TRUE" ]]; then + ssh_tty_to_host $host "echo docker stop $deal_name; + echo docker rm $deal_name" + else + ssh_tty_to_host $host "docker stop $deal_name; + docker rm $deal_name" + fi + fi +} + ###################################################################### # Local automation diff --git a/tab_completions.sh b/completions.sh similarity index 100% rename from tab_completions.sh rename to completions.sh diff --git a/data.json b/data.json index 7c632fe..ef10a47 100644 --- a/data.json +++ b/data.json @@ -33,6 +33,9 @@ "issue_path": "/opt/gitlab", "image": "gitlab/gitlab-ce:latest", "options": [ + [ + "--rm" + ], [ "--volume", "/opt/gitlab/config:/etc/gitlab:Z", @@ -49,7 +52,7 @@ ["--hostname","gitlab.adamo.network"], [ "-e", - "GITLAB_OMNIBUS_CONFIG=\"external_url 'http://gitlab.adamo.network:45000'; gitlab_rails['gitlab_shell_ssh_port'] = 22\"" + "GITLAB_OMNIBUS_CONFIG=\"external_url 'http://gitlab.adamo.network:45000'; gitlab_rails['gitlab_shell_ssh_port'] = 45022\"" ] ] },