-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker build job in manifest e2e workflow
Signed-off-by: Yingchun Guo <[email protected]>
- Loading branch information
1 parent
4d36def
commit 83cdf57
Showing
4 changed files
with
128 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -xe | ||
|
||
echo "Using IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG" | ||
|
||
IMAGE_REPO=${IMAGE_REPO:-} | ||
IMAGE_TAG=${IMAGE_TAG:-latest} | ||
|
||
function docker_build() { | ||
# docker_build <service_name> <dockerfile> | ||
if [ -z "$2" ]; then | ||
DOCKERFILE_PATH=Dockerfile | ||
else | ||
DOCKERFILE_PATH=$2 | ||
fi | ||
echo "Building ${IMAGE_REPO}opea/$1:$IMAGE_TAG using Dockerfile $DOCKERFILE_PATH" | ||
# if https_proxy and http_proxy are set, pass them to docker build | ||
if [ -z "$https_proxy" ]; then | ||
docker build --no-cache -t ${IMAGE_REPO}opea/$1:$IMAGE_TAG -f $DOCKERFILE_PATH . | ||
else | ||
docker build --no-cache -t ${IMAGE_REPO}opea/$1:$IMAGE_TAG --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $DOCKERFILE_PATH . | ||
fi | ||
docker push ${IMAGE_REPO}opea/$1:$IMAGE_TAG | ||
docker rmi ${IMAGE_REPO}opea/$1:$IMAGE_TAG | ||
} | ||
|
||
case "$1" in | ||
AudioQnA) | ||
;; | ||
ChatQnA) | ||
cd ChatQnA/docker | ||
docker_build chatqna | ||
cd ../../ChatQnA/ui | ||
docker_build chatqna-ui docker/Dockerfile | ||
;; | ||
CodeGen) | ||
cd CodeGen/docker | ||
docker_build codegen | ||
cd ../../CodeGen/ui | ||
docker_build codegen-ui docker/Dockerfile | ||
;; | ||
CodeTrans) | ||
cd CodeGen/docker | ||
docker_build codetrans | ||
;; | ||
DocSum) | ||
cd DocSum/docker | ||
docker_build docsum | ||
;; | ||
SearchQnA) | ||
;; | ||
Translation) | ||
;; | ||
VisualQnA) | ||
;; | ||
*) | ||
echo "Unknown function: $1" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters