From 2f8ec1e249f42dfe7ebe015cbc30b88e5dea7f68 Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Fri, 22 Nov 2024 12:41:44 +0000 Subject: [PATCH 1/3] Use official name and email for CICD Signed-off-by: Dolpher Du --- .github/workflows/manual-freeze-tag.yaml | 6 +++--- .github/workflows/manual-release-charts.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-freeze-tag.yaml b/.github/workflows/manual-freeze-tag.yaml index 6ed69c853..ac6941540 100644 --- a/.github/workflows/manual-freeze-tag.yaml +++ b/.github/workflows/manual-freeze-tag.yaml @@ -37,9 +37,9 @@ jobs: - name: Set up Git run: | - git config --global user.name "NeuralChatBot" - git config --global user.email "grp_neural_chat_bot@intel.com" - git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git + git config --global user.name "CICD-at-OPEA" + git config --global user.email "CICD@opea.dev" + git remote set-url origin https://CICD-at-OPEA:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git - name: Run script env: diff --git a/.github/workflows/manual-release-charts.yaml b/.github/workflows/manual-release-charts.yaml index 5f8435847..ca37bbc2a 100644 --- a/.github/workflows/manual-release-charts.yaml +++ b/.github/workflows/manual-release-charts.yaml @@ -71,9 +71,9 @@ jobs: # # Insert copyright to avoid warnings # sed -i '1s/^/# Copyright (C) 2024 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\n/' index.yaml - # git config --global user.name "NeuralChatBot" - # git config --global user.email "grp_neural_chat_bot@intel.com" - # git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git + # git config --global user.name "CICD-at-OPEA" + # git config --global user.email "CICD@opea.dev" + # git remote set-url origin https://CICD-at-OPEA:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git # git status # git add . From 13f6d39f3c1c2ca23a46d90e608128c677e80ca2 Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Fri, 22 Nov 2024 13:21:16 +0000 Subject: [PATCH 2/3] Enable GH action to trigger test with released image Signed-off-by: Dolpher Du --- .github/workflows/_helm-e2e.yaml | 14 ++++++++++++-- .github/workflows/manual-helm-cd-workflow.yaml | 6 ++++++ .github/workflows/manual-release-charts.yaml | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_helm-e2e.yaml b/.github/workflows/_helm-e2e.yaml index 0062127b0..a00b56082 100644 --- a/.github/workflows/_helm-e2e.yaml +++ b/.github/workflows/_helm-e2e.yaml @@ -11,6 +11,11 @@ on: required: true type: string description: "workload to test, chatqna or common/asr" + dockerhub: + default: "false" + required: false + type: string + description: "Set to true if you want to use released docker images at dockerhub. By default using internal docker registry." tag: default: "latest" required: false @@ -81,8 +86,13 @@ jobs: CHART_MOUNT=/home/$USER_ID/.cache/huggingface/hub HFTOKEN=$(cat /home/$USER_ID/.cache/huggingface/token) pushd helm-charts - # insert a prefix before opea/.*, the prefix is OPEA_IMAGE_REPO - find . -name '*values.yaml' -type f -exec sed -i "s#repository: opea/*#repository: ${OPEA_IMAGE_REPO}opea/#g" {} \; + if [ "${{ inputs.dockerhub }}" = "true" ]; then + echo "Use released docker images" + else + echo "Use internal docker registry" + # insert a prefix before opea/.*, the prefix is OPEA_IMAGE_REPO + find . -name '*values.yaml' -type f -exec sed -i "s#repository: opea/*#repository: ${OPEA_IMAGE_REPO}opea/#g" {} \; + fi # set OPEA image tag to ${{ inputs.tag }} find . -name '*values.yaml' -type f -exec sed -i 's#tag: "latest"#tag: ${{ inputs.tag }}#g' {} \; # set huggingface token diff --git a/.github/workflows/manual-helm-cd-workflow.yaml b/.github/workflows/manual-helm-cd-workflow.yaml index 322a8c513..8c083be8b 100644 --- a/.github/workflows/manual-helm-cd-workflow.yaml +++ b/.github/workflows/manual-helm-cd-workflow.yaml @@ -10,6 +10,11 @@ on: required: false type: string description: "workloads to test, empty for testing all helm charts" + dockerhub: + default: "false" + required: false + type: string + description: "Set to true if you want to use released docker images at dockerhub. By default using internal docker registry." tag: default: "latest" description: "Image tag to be tested" @@ -98,6 +103,7 @@ jobs: uses: ./.github/workflows/_helm-e2e.yaml with: tag: ${{ inputs.tag }} + dockerhub: ${{ inputs.dockerhub }} workload: ${{ matrix.directory }}/${{ matrix.example }} hardware: ${{ matrix.hardware }} valuefile: ${{ matrix.valuefile }} diff --git a/.github/workflows/manual-release-charts.yaml b/.github/workflows/manual-release-charts.yaml index ca37bbc2a..9865e945b 100644 --- a/.github/workflows/manual-release-charts.yaml +++ b/.github/workflows/manual-release-charts.yaml @@ -84,7 +84,7 @@ jobs: echo "Publish charts version ${{ inputs.version }}to ghcr" echo "${{ secrets.ACTION_TOKEN }}" | helm registry login ghcr.io -u test --password-stdin for chart in *-${{ inputs.version }}.tgz; do - echo "Publishing ${chart}\n" + echo "Publishing ${chart}" helm push ${chart} oci://ghcr.io/opea-project/charts done fi From bef010a379614275f1cba53bf504020cc68efbde Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Fri, 22 Nov 2024 13:23:42 +0000 Subject: [PATCH 3/3] Unify quotation marks usage for repository Signed-off-by: Dolpher Du --- helm-charts/chatqna/values.yaml | 2 +- helm-charts/visualqna/values.yaml | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/helm-charts/chatqna/values.yaml b/helm-charts/chatqna/values.yaml index 2c77c49f7..0cd82d7ff 100644 --- a/helm-charts/chatqna/values.yaml +++ b/helm-charts/chatqna/values.yaml @@ -57,7 +57,7 @@ guardrails-usvc: # Uncomment the following lines # chatqna-ui: # image: -# repository: "opea/chatqna-ui" +# repository: opea/chatqna-ui # tag: "latest" # containerPort: "5173" diff --git a/helm-charts/visualqna/values.yaml b/helm-charts/visualqna/values.yaml index 199dc2606..4d32ae0e8 100644 --- a/helm-charts/visualqna/values.yaml +++ b/helm-charts/visualqna/values.yaml @@ -56,14 +56,6 @@ visualqna-ui: BACKEND_SERVICE_ENDPOINT: "/v1/visualqna" containerPort: 5173 -# If you would like to switch to traditional UI image -# Uncomment the following lines -# visualqna-ui: -# image: -# repository: "opea/visualqna-ui" -# tag: "latest" -# containerPort: "5173" - global: http_proxy: "" https_proxy: ""