@@ -16,14 +16,17 @@ LOG_PATH="$WORKPATH/tests"
1616ip_address=$( hostname -I | awk ' {print $1}' )
1717
1818function build_docker_images() {
19+ opea_branch=${opea_branch:- " main" }
1920 cd $WORKPATH /docker_image_build
20- git clone --depth 1 --branch ${opea_branch:- " main" } https://github.com/opea-project/GenAIComps.git
21+ git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
22+ pushd GenAIComps
23+ echo " GenAIComps test commit is $( git rev-parse HEAD) "
24+ docker build --no-cache -t ${REGISTRY} /comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
25+ popd && sleep 1s
2126
2227 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
2328 docker compose -f build.yaml build --no-cache > ${LOG_PATH} /docker_image_build.log
2429
25- docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
26- docker pull ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
2730 docker images && sleep 1s
2831}
2932
@@ -41,7 +44,7 @@ function start_services() {
4144
4245 n=0
4346 until [[ " $n " -ge 100 ]]; do
44- docker logs tgi_service_codegen > ${LOG_PATH} /tgi_service_codegen_start.log
47+ docker logs tgi_service_codegen > ${LOG_PATH} /tgi_service_codegen_start.log 2>&1
4548 if grep -q Connected ${LOG_PATH} /tgi_service_codegen_start.log; then
4649 echo " CodeGen TGI Service Connected"
4750 break
@@ -260,23 +263,31 @@ function stop_docker() {
260263
261264function main() {
262265
266+ echo " ::group::stop_docker"
263267 stop_docker
268+ echo " ::endgroup::"
269+
270+ echo " ::group::build_docker_images"
264271 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
265- start_time=$( date +%s)
272+ echo " ::endgroup::"
273+
274+ echo " ::group::start_services"
266275 start_services
267- end_time=$( date +%s)
268- duration=$(( end_time- start_time))
269- echo " Mega service start duration is $duration s" && sleep 1s
276+ echo " ::endgroup::"
270277
278+ echo " ::group::validate_microservices"
271279 validate_microservices
272- echo " ==== microservices validated ==== "
273- validate_megaservice
274- echo " ==== megaservices validated ==== "
280+ echo " ::endgroup:: "
281+
282+ echo " ::group::validate_frontend "
275283 validate_frontend
276- echo " ==== frontend validated ==== "
284+ echo " ::endgroup:: "
277285
286+ echo " ::group::stop_docker"
278287 stop_docker
279- echo y | docker system prune
288+ echo " ::endgroup::"
289+
290+ docker system prune -f
280291
281292}
282293
0 commit comments