From ddbc3b2457a035f3ce50a90f6b1c912b7cd8d7f8 Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Fri, 17 Dec 2021 10:02:19 -0800 Subject: [PATCH 1/3] Update docker scripts to use new & improved docker IP detection Signed-off-by: Ian Costanzo --- demo/run_bdd | 4 +++- demo/run_demo | 4 +++- docker/manage | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/demo/run_bdd b/demo/run_bdd index da898a79b2..a8306aa947 100755 --- a/demo/run_bdd +++ b/demo/run_bdd @@ -133,7 +133,9 @@ if [ ! -z "$DOCKERHOST" ]; then # provided via APPLICATION_URL environment variable export RUNMODE="docker" elif [ -z "${PWD_HOST_FQDN}" ]; then - DOCKERHOST=`docker run --rm --net=host eclipse/che-ip` + # getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost + . /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))" + export DOCKERHOST=$(getDockerHost) export RUNMODE="docker" else PWD_HOST="${PWD_HOST_FQDN}" diff --git a/demo/run_demo b/demo/run_demo index 8955c837c2..ce2c193804 100755 --- a/demo/run_demo +++ b/demo/run_demo @@ -153,7 +153,9 @@ if [ ! -z "$DOCKERHOST" ]; then # provided via APPLICATION_URL environment variable export RUNMODE="docker" elif [ -z "${PWD_HOST_FQDN}" ]; then - DOCKERHOST=`docker run --rm --net=host eclipse/che-ip` + # getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost + . /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))" + export DOCKERHOST=$(getDockerHost) export RUNMODE="docker" else PWD_HOST="${PWD_HOST_FQDN}" diff --git a/docker/manage b/docker/manage index 3fc8f70794..990a11f1a0 100755 --- a/docker/manage +++ b/docker/manage @@ -1,6 +1,8 @@ #!/bin/bash export MSYS_NO_PATHCONV=1 -export DOCKERHOST=${APPLICATION_URL-$(docker run --rm --net=host eclipse/che-ip)} +# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost +. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))" +export DOCKERHOST=$(getDockerHost) set -e SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)" From 54b334042382ea65fcbeefb24b49cbe70bc71499 Mon Sep 17 00:00:00 2001 From: Shaanjot Gill Date: Fri, 17 Dec 2021 15:12:29 -0800 Subject: [PATCH 2/3] typo fixes Signed-off-by: Shaanjot Gill --- .../protocols/discovery/v1_0/models/discovery_record.py | 2 +- .../protocols/discovery/v2_0/models/discovery_record.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/protocols/discovery/v1_0/models/discovery_record.py b/aries_cloudagent/protocols/discovery/v1_0/models/discovery_record.py index 1ce22fc0ee..0098295f5e 100644 --- a/aries_cloudagent/protocols/discovery/v1_0/models/discovery_record.py +++ b/aries_cloudagent/protocols/discovery/v1_0/models/discovery_record.py @@ -27,7 +27,7 @@ class Meta: RECORD_TYPE = "discovery_exchange_v10" RECORD_ID_NAME = "discovery_exchange_id" - RECORD_TOPIC = "dicover_feature" + RECORD_TOPIC = "discover_feature" TAG_NAMES = {"~thread_id" if UNENCRYPTED_TAGS else "thread_id", "connection_id"} def __init__( diff --git a/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py b/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py index 44633c2b43..915eafdeb5 100644 --- a/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py +++ b/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py @@ -27,7 +27,7 @@ class Meta: RECORD_TYPE = "discovery_exchange_v20" RECORD_ID_NAME = "discovery_exchange_id" - RECORD_TOPIC = "dicover_feature" + RECORD_TOPIC = "discover_feature" TAG_NAMES = {"~thread_id" if UNENCRYPTED_TAGS else "thread_id", "connection_id"} def __init__( From f181803f31d4475e3c11e7a23eadefc49ae5f0c5 Mon Sep 17 00:00:00 2001 From: Shaanjot Gill Date: Fri, 17 Dec 2021 15:23:12 -0800 Subject: [PATCH 3/3] change v2 RECORD_TOPIC Signed-off-by: Shaanjot Gill --- .../protocols/discovery/v2_0/models/discovery_record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py b/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py index 915eafdeb5..87a35af0df 100644 --- a/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py +++ b/aries_cloudagent/protocols/discovery/v2_0/models/discovery_record.py @@ -27,7 +27,7 @@ class Meta: RECORD_TYPE = "discovery_exchange_v20" RECORD_ID_NAME = "discovery_exchange_id" - RECORD_TOPIC = "discover_feature" + RECORD_TOPIC = "discover_feature_v2_0" TAG_NAMES = {"~thread_id" if UNENCRYPTED_TAGS else "thread_id", "connection_id"} def __init__(