File tree Expand file tree Collapse file tree 10 files changed +63
-16
lines changed Expand file tree Collapse file tree 10 files changed +63
-16
lines changed Original file line number Diff line number Diff line change @@ -146,4 +146,5 @@ jobs:
146
146
example : ${{ inputs.example }}
147
147
hardware : ${{ inputs.node }}
148
148
tag : ${{ inputs.tag }}
149
+ context : " CD"
149
150
secrets : inherit
Original file line number Diff line number Diff line change 20
20
description : " Tag to apply to images, default is latest"
21
21
required : false
22
22
type : string
23
+ context :
24
+ default : " CI"
25
+ description : " CI or CD"
26
+ required : false
27
+ type : string
23
28
24
29
jobs :
25
30
manifest-test :
55
60
echo "continue_test=true" >> $GITHUB_ENV
56
61
echo "should_cleanup=false" >> $GITHUB_ENV
57
62
echo "skip_validate=true" >> $GITHUB_ENV
63
+ echo "CONTEXT=${{ inputs.context }}" >> $GITHUB_ENV
58
64
echo "NAMESPACE=$NAMESPACE"
59
65
60
66
- name : Kubectl install
Original file line number Diff line number Diff line change @@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
12
12
function init_chatqna() {
13
13
# replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
14
14
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
15
- # replace megaservice image tag
16
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG} #g" {} \;
15
+ if [ $CONTEXT == " CI" ]; then
16
+ # replace megaservice image tag
17
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/chatqna:latest#image: \" opea/chatqna:${IMAGE_TAG} #g" {} \;
18
+ else
19
+ # replace microservice image tag
20
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
21
+ fi
17
22
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
18
23
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
19
24
# set huggingface token
Original file line number Diff line number Diff line change @@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
12
12
function init_chatqna() {
13
13
# replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
14
14
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
15
- # replace megaservice image tag
16
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG} #g" {} \;
15
+ if [ $CONTEXT == " CI" ]; then
16
+ # replace megaservice image tag
17
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/chatqna:latest#image: \" opea/chatqna:${IMAGE_TAG} #g" {} \;
18
+ else
19
+ # replace microservice image tag
20
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
21
+ fi
17
22
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
18
23
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
19
24
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_codegen() {
13
13
# executed under path manifest/codegen/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/codegen:latest#image: \" opea/codegen:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_codegen() {
13
13
# executed under path manifest/codegen/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/codegen:latest#image: \" opea/codegen:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_codetrans() {
13
13
# executed under path manifest/codetrans/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/codetrans:latest#image: \" opea/codetrans:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_codetrans() {
13
13
# executed under path manifest/codetrans/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/codetrans:latest#image: \" opea/codetrans:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_docsum() {
13
13
# executed under path manifest/docsum/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/docsum:latest#image: \" opea/docsum:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
Original file line number Diff line number Diff line change @@ -13,8 +13,13 @@ function init_docsum() {
13
13
# executed under path manifest/docsum/xeon
14
14
# replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
15
15
find . -name ' *.yaml' -type f -exec sed -i " s#path: /mnt/opea-models#path: $MOUNT_DIR #g" {} \;
16
- # replace megaservice image tag
17
- find . -name ' *.yaml' -type f -exec sed -i " s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG} #g" {} \;
16
+ if [ $CONTEXT == " CI" ]; then
17
+ # replace megaservice image tag
18
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/docsum:latest#image: \" opea/docsum:${IMAGE_TAG} #g" {} \;
19
+ else
20
+ # replace microservice image tag
21
+ find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/\(.*\):latest#image: \" opea/\1:${IMAGE_TAG} #g" {} \;
22
+ fi
18
23
# replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
19
24
find . -name ' *.yaml' -type f -exec sed -i " s#image: \" opea/*#image: \" ${IMAGE_REPO} opea/#g" {} \;
20
25
# set huggingface token
You can’t perform that action at this time.
0 commit comments