Skip to content

Commit

Permalink
Github action changes (#606)
Browse files Browse the repository at this point in the history
* Use official name and email for CICD

Signed-off-by: Dolpher Du <[email protected]>

* Enable GH action to trigger test with released image

Signed-off-by: Dolpher Du <[email protected]>

* Unify quotation marks usage for repository

Signed-off-by: Dolpher Du <[email protected]>

---------

Signed-off-by: Dolpher Du <[email protected]>
  • Loading branch information
yongfengdu authored Nov 22, 2024
1 parent 3a7cb76 commit 576b25a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/_helm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-freeze-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:

- name: Set up Git
run: |
git config --global user.name "NeuralChatBot"
git config --global user.email "[email protected]"
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 "[email protected]"
git remote set-url origin https://CICD-at-OPEA:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git
- name: Run script
env:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/manual-helm-cd-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual-release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
# 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 "[email protected]"
# git remote set-url origin https://CICD-at-OPEA:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIInfra.git
# git status
# git add .
Expand All @@ -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
2 changes: 1 addition & 1 deletion helm-charts/chatqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 0 additions & 8 deletions helm-charts/visualqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down

0 comments on commit 576b25a

Please sign in to comment.