File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,20 @@ case "$1" in
3030 echo " $ports "
3131 for port in $ports ; do
3232 if [[ $port =~ [a-zA-Z_-] ]]; then
33- port=$( grep -E " export $port =" tests/$test_case | cut -d' =' -f2)
33+ echo " Search port value $port from the test case..."
34+ port_fix=$( grep -E " export $port =" tests/$test_case | cut -d' =' -f2)
35+ if [[ " $port_fix " == " " ]]; then
36+ echo " Can't find the port value from the test case, use the default value in yaml..."
37+ port_fix=$( yq ' .services[].ports[]' $yaml_file | grep $port | cut -d' :' -f2 | grep -o ' [0-9a-zA-Z]\+' )
38+ fi
39+ port=$port_fix
3440 fi
3541 if [[ $port =~ [0-9] ]]; then
3642 if [[ $port == 5000 ]]; then
3743 echo " Error: Port 5000 is used by local docker registry, please DO NOT use it in docker compose deployment!!!"
3844 exit 1
3945 fi
46+ echo " Check port $port ..."
4047 cid=$( docker ps --filter " publish=${port} " --format " {{.ID}}" )
4148 if [[ ! -z " $cid " ]]; then docker stop $cid && docker rm $cid && echo " release $port " ; fi
4249 fi
You can’t perform that action at this time.
0 commit comments