Skip to content

Commit e60951e

Browse files
authored
[CICD enhance] ProductivitySuite run CI with latest base image, group logs in GHA outputs. (#2072)
Signed-off-by: chensuyue <[email protected]>
1 parent 66540e6 commit e60951e

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

HybridRAG/tests/test_compose_on_gaudi.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ source set_env.sh
2020

2121
function build_docker_images() {
2222
opea_branch=${opea_branch:-"main"}
23-
2423
cd $WORKPATH/docker_image_build
2524
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
2625
pushd GenAIComps

ProductivitySuite/docker_image_build/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ services:
55
chatqna:
66
build:
77
args:
8+
IMAGE_REPO: ${REGISTRY}
9+
BASE_TAG: ${TAG}
810
http_proxy: ${http_proxy}
911
https_proxy: ${https_proxy}
1012
no_proxy: ${no_proxy}

ProductivitySuite/tests/test_compose_on_xeon.sh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ LOG_PATH="$WORKPATH/tests"
1616
ip_address=$(hostname -I | awk '{print $1}')
1717

1818
function 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

261264
function 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

Comments
 (0)