change microservice tags in CD workflow (#612)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
This commit is contained in:
Ying Chun Guo
2024-08-16 21:57:28 +08:00
committed by GitHub
parent a39f23a16e
commit 71363a6b9d
10 changed files with 63 additions and 16 deletions

View File

@@ -13,8 +13,13 @@ function init_codetrans() {
# executed under path manifest/codetrans/xeon
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
# replace megaservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
if [ $CONTEXT == "CI" ]; then
# replace megaservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
else
# replace microservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
fi
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
# set huggingface token

View File

@@ -13,8 +13,13 @@ function init_codetrans() {
# executed under path manifest/codetrans/xeon
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
# replace megaservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
if [ $CONTEXT == "CI" ]; then
# replace megaservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
else
# replace microservice image tag
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
fi
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
# set huggingface token