Skip to content

Commit f452f68

Browse files
author
Mahmudul Hassan Rony
committed
Added CUE endpoint bridge
An optional backend bridge option has been added to the CUE profile to support new endpoint "bridge"
1 parent 0c29e6b commit f452f68

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

usr/local/src/unit-tests/ece-install-conf-file-reader-test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ test_can_parse_yaml_conf_cue() {
387387
local cue_backend_ece=http://ece.example.com
388388
local cue_backend_ece_local=http://localhost:8080
389389
local cue_backend_ng=http://ng.example.com
390+
local cue_backend_bridge=http://bridge.example.com
390391
local cue_cors_origin1=editor.example.com
391392
local cue_cors_origin2=cue.example.com
392393

@@ -400,6 +401,7 @@ profiles:
400401
backend_ece: ${cue_backend_ece}
401402
backend_ece_local: ${cue_backend_ece_local}
402403
backend_ng: ${cue_backend_ng}
404+
backend_bridge: ${cue_backend_bridge}
403405
cors_origins:
404406
- ${cue_cors_origin1}
405407
- ${cue_cors_origin2}
@@ -409,6 +411,7 @@ EOF
409411
unset fai_cue_backend_ece
410412
unset fai_cue_backend_ece_local
411413
unset fai_cue_backend_ng
414+
unset fai_cue_backend_bridge
412415
unset fai_cue_cors_origins
413416

414417
parse_yaml_conf_file_or_source_if_sh_conf "${yaml_file}"
@@ -417,6 +420,7 @@ EOF
417420
assertEquals "fai_cue_backend_ece" "${cue_backend_ece}" "${fai_cue_backend_ece}"
418421
assertEquals "fai_cue_backend_ece_local" "${cue_backend_ece_local}" "${fai_cue_backend_ece_local}"
419422
assertEquals "fai_cue_backend_ng" "${cue_backend_ng}" "${fai_cue_backend_ng}"
423+
assertEquals "fai_cue_backend_bridge" "${cue_backend_bridge}" "${fai_cue_backend_bridge}"
420424
assertEquals "fai_cue_cors_origins" "${cue_cors_origin1} ${cue_cors_origin2}" "${fai_cue_cors_origins}"
421425

422426
rm -rf "${yaml_file}"

usr/share/doc/escenic/ece-install-conf-reference.org

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ profiles:
196196
backend_ece: ${cue_backend_ece}
197197
backend_ece_local: ${cue_backend_ece_local}
198198
backend_ng: ${cue_backend_ng}
199+
backend_bridge: ${cue_backend_bridge}
199200
cors_origins:
200201
- ${cue_cors_origin1}
201202
- ${cue_cors_origin2}
@@ -207,6 +208,7 @@ fai_cue_install=
207208
fai_cue_backend_ece=
208209
fai_cue_backend_ece_local=
209210
fai_cue_backend_ng=
211+
fai_cue_backend_bridge=
210212
fai_cue_cors_origins=
211213

212214
#+end_src

usr/share/escenic/ece-scripts/ece-install.d/conf-file-reader.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,12 @@ _parse_yaml_conf_file_cue() {
888888
export fai_cue_backend_ng=${install_cue_backend_ng}
889889
fi
890890

891+
local install_cue_backend_bridge=
892+
install_cue_backend_bridge=$(_jq "${yaml_file}" .profiles.cue.backend_bridge)
893+
if [ -n "${install_cue_backend_bridge}" ]; then
894+
export fai_cue_backend_bridge=${install_cue_backend_bridge}
895+
fi
896+
891897
local count=0
892898
count=$(_jq "${yaml_file}" ".profiles.cue.cors_origins | length")
893899
for ((i = 0; i < count; i++)); do

usr/share/escenic/ece-scripts/ece-install.d/cue.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ EOF
158158
if [ -n "${fai_cue_backend_ng}" ]; then
159159
echo " newsgate: ${fai_cue_backend_ng}" >> "${file}"
160160
fi
161+
162+
if [ -n "${fai_cue_backend_bridge}" ]; then
163+
echo " bridge: ${fai_cue_backend_bridge}" >> "${file}"
164+
fi
161165
done
162166

163167
if [ "${on_debian_or_derivative-0}" -eq 1 ]; then

0 commit comments

Comments
 (0)