Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_comps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ jobs:
tag: ${{ inputs.tag }}
mode: ${{ inputs.mode }}
service: ${{ inputs.service }}
hardware: ${{ inputs.node }}
hardware: ${{ inputs.hardware }}
secrets: inherit
19 changes: 14 additions & 5 deletions .github/workflows/_run-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
dockerhub:
default: "false"
required: false
type: string
type: boolean
description: "Set to true if you want to use released docker images at dockerhub. By default using internal docker registry."
tag:
default: "latest"
Expand Down Expand Up @@ -62,11 +62,12 @@ jobs:
base_commit=${{ github.event.pull_request.base.sha }}
merged_commit=$(git log -1 --format='%H')
values_files=$(git diff --name-only ${base_commit} ${merged_commit} | \
grep "kubernetes" | \
grep "values.yaml" | \
grep "${{ inputs.service }}" | \
sort -u )
echo $values_files
elif [ "${{ inputs.mode }}" = "CD" ]; then
values_files=$(ls ${{ github.workspace }}/comps/"${{ inputs.service }}"/deployment/kubernetes/*values.yaml)
values_files=$(ls ${{ github.workspace }}/comps/${{ inputs.service }}/deployment/kubernetes/*values.yaml)
fi
value_files="["
for file in ${values_files}; do
Expand Down Expand Up @@ -153,7 +154,15 @@ jobs:
exit 0
fi

if ! helm install --create-namespace --namespace $NAMESPACE $RELEASE_NAME oci://ghcr.io/opea-project/charts/${CHART_NAME} --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=/home/sdp/.cache/huggingface/hub -f comps/${{ inputs.service }}/deployment/kubernetes/${value_file} --version 0-latest --wait; then
if ! helm install --create-namespace --namespace $NAMESPACE $RELEASE_NAME \
oci://ghcr.io/opea-project/charts/${CHART_NAME} \
--set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} \
--set global.modelUseHostPath=/home/sdp/.cache/huggingface/hub \
--set GOOGLE_API_KEY=${{ env.GOOGLE_API_KEY}} \
--set GOOGLE_CSE_ID=${{ env.GOOGLE_CSE_ID}} \
-f comps/${{ inputs.service }}/deployment/kubernetes/${value_file} \
--version 0-latest \
--wait; then
echo "Failed to install chart ${{ inputs.service }}"
echo "skip_validate=true" >> $GITHUB_ENV
.github/workflows/scripts/k8s-utils.sh dump_pods_status $NAMESPACE
Expand Down Expand Up @@ -200,7 +209,7 @@ jobs:
- name: Helm uninstall
if: always()
run: |
if $should_cleanup; then
if [[ $should_cleanup ]]; then
helm uninstall $RELEASE_NAME --namespace $NAMESPACE
if ! kubectl delete ns $NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
kubectl delete pods --namespace $NAMESPACE --force --grace-period=0 --all
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual-comps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
services=($(echo ${{ inputs.services }} | tr ',' ' '))
services_json=$(printf '%s\n' "${services[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "services=$services_json" >> $GITHUB_OUTPUT
if [ ${{ inputs.test_helmchart }} == "true" ]; then
if [ "${{ inputs.test_helmchart }}" == "true" ]; then
nodes=($(echo ${{ inputs.nodes }} | tr ',' ' '))
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
Expand All @@ -69,12 +69,12 @@ jobs:
strategy:
matrix:
service: ${{ fromJson(needs.get-test-matrix.outputs.services) }}
nodes: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
fail-fast: false
uses: ./.github/workflows/_comps-workflow.yml
with:
service: ${{ matrix.service }}
hardware: ${{ matrix.nodes }}
hardware: ${{ matrix.node }}
tag: ${{ inputs.tag }}
mode: ${{ inputs.mode }}
test_compose: ${{ inputs.test_compose }}
Expand Down