Skip to content

[CICD enhance] DBQnA run CI with latest base image, group logs in GHA outputs. #1931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DBQnA/docker_image_build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
context: GenAIComps
dockerfile: comps/text2sql/src/Dockerfile
args:
IMAGE_REPO: ${REGISTRY:-opea}
BASE_TAG: ${TAG:-latest}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
Expand All @@ -16,8 +18,6 @@ services:
context: ../ui
dockerfile: ./docker/Dockerfile.react
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
texttosql_url: ${build_texttosql_url}
extends: text2sql
image: ${REGISTRY:-opea}/text2sql-react-ui:${TAG:-latest}
32 changes: 27 additions & 5 deletions DBQnA/tests/test_compose_on_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

set -xe

IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
export REGISTRY=${IMAGE_REPO}
export TAG=${IMAGE_TAG}

WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')
Expand All @@ -25,7 +32,7 @@ function build_docker_images() {
docker images && sleep 1s
}

function start_service() {
function start_services() {
cd "$WORKPATH"/docker_compose/amd/gpu/rocm
# Start Docker Containers
docker compose up -d > "${LOG_PATH}"/start_services_with_compose.log
Expand Down Expand Up @@ -95,16 +102,31 @@ function stop_docker() {

function main() {

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"

echo "::group::build_docker_images"
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
echo "::endgroup::"

echo "::group::start_services"
start_services
echo "::endgroup::"

build_docker_images
start_service
sleep 10s
echo "::group::validate_microservice"
validate_microservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo y | docker system prune
echo "::endgroup::"

docker system prune -f

}

Expand Down
23 changes: 19 additions & 4 deletions DBQnA/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function build_docker_images() {
docker images && sleep 1s
}

function start_service() {
function start_services() {
cd $WORKPATH/docker_compose/intel/cpu/xeon
source ./set_env.sh

Expand Down Expand Up @@ -101,16 +101,31 @@ function stop_docker() {

function main() {

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"

build_docker_images
start_service
echo "::group::build_docker_images"
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
echo "::endgroup::"

echo "::group::start_services"
start_services
echo "::endgroup::"

echo "::group::validate_microservice"
validate_microservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo y | docker system prune
echo "::endgroup::"

docker system prune -f

}

Expand Down