Skip to content

Commit 57a8bfa

Browse files
committed
Group log lines in GHA outputs for better readable logs.
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent 7590b05 commit 57a8bfa

File tree

3 files changed

+47
-10
lines changed

3 files changed

+47
-10
lines changed

DBQnA/docker_image_build/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ services:
77
context: GenAIComps
88
dockerfile: comps/text2sql/src/Dockerfile
99
args:
10+
IMAGE_REPO: ${REGISTRY:-opea}
11+
BASE_TAG: ${TAG:-latest}
1012
http_proxy: ${http_proxy}
1113
https_proxy: ${https_proxy}
1214
no_proxy: ${no_proxy}
@@ -16,8 +18,6 @@ services:
1618
context: ../ui
1719
dockerfile: ./docker/Dockerfile.react
1820
args:
19-
http_proxy: ${http_proxy}
20-
https_proxy: ${https_proxy}
21-
no_proxy: ${no_proxy}
2221
texttosql_url: ${build_texttosql_url}
22+
expends: text2sql
2323
image: ${REGISTRY:-opea}/text2sql-react-ui:${TAG:-latest}

DBQnA/tests/test_compose_on_rocm.sh

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
set -xe
66

7+
IMAGE_REPO=${IMAGE_REPO:-"opea"}
8+
IMAGE_TAG=${IMAGE_TAG:-"latest"}
9+
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
10+
echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
11+
export REGISTRY=${IMAGE_REPO}
12+
export TAG=${IMAGE_TAG}
13+
714
WORKPATH=$(dirname "$PWD")
815
LOG_PATH="$WORKPATH/tests"
916
ip_address=$(hostname -I | awk '{print $1}')
@@ -95,16 +102,31 @@ function stop_docker() {
95102

96103
function main() {
97104

105+
echo "::group::stop_docker"
98106
stop_docker
107+
echo "::endgroup::"
108+
109+
echo "::group::build_docker_images"
110+
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
111+
echo "::endgroup::"
112+
113+
echo "::group::start_services"
114+
start_services
115+
echo "::endgroup::"
99116

100-
build_docker_images
101-
start_service
102-
sleep 10s
117+
echo "::group::validate_microservice"
103118
validate_microservice
119+
echo "::endgroup::"
120+
121+
echo "::group::validate_frontend"
104122
validate_frontend
123+
echo "::endgroup::"
105124

125+
echo "::group::stop_docker"
106126
stop_docker
107-
echo y | docker system prune
127+
echo "::endgroup::"
128+
129+
docker system prune -f
108130

109131
}
110132

DBQnA/tests/test_compose_on_xeon.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,31 @@ function stop_docker() {
101101

102102
function main() {
103103

104+
echo "::group::stop_docker"
104105
stop_docker
106+
echo "::endgroup::"
105107

106-
build_docker_images
107-
start_service
108+
echo "::group::build_docker_images"
109+
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
110+
echo "::endgroup::"
108111

112+
echo "::group::start_services"
113+
start_services
114+
echo "::endgroup::"
115+
116+
echo "::group::validate_microservice"
109117
validate_microservice
118+
echo "::endgroup::"
119+
120+
echo "::group::validate_frontend"
110121
validate_frontend
122+
echo "::endgroup::"
111123

124+
echo "::group::stop_docker"
112125
stop_docker
113-
echo y | docker system prune
126+
echo "::endgroup::"
127+
128+
docker system prune -f
114129

115130
}
116131

0 commit comments

Comments
 (0)