Comps CD workflow on manual event #135
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (C) 2024 Intel Corporation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Comps CD workflow on manual event | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| services: | |
| default: "asr" | |
| description: "List of services to test [agent,asr,chathistory,dataprep,embeddings,feedback_management,finetuning,guardrails,knowledgegraphs,llms,lvms,nginx,prompt_registry,ragas,rerankings,retrievers,tts,web_retrievers]" | |
| required: true | |
| type: string | |
| build: | |
| default: true | |
| description: "Build test required images for Comps" | |
| required: false | |
| type: boolean | |
| test_compose: | |
| default: true | |
| description: "Test comps with docker compose" | |
| required: false | |
| type: boolean | |
| test_helmchart: | |
| default: true | |
| description: "Test comps with helm chart" | |
| required: false | |
| type: boolean | |
| nodes: | |
| default: "gaudi,xeon" | |
| description: "Hardware that only runs helm chart test" | |
| required: false | |
| type: string | |
| tag: | |
| default: "rc" | |
| description: "Tag to apply to images" | |
| required: true | |
| type: string | |
| mode: | |
| default: "CD" | |
| description: "Whether the test range is CI, CD or CICD" | |
| required: false | |
| type: string | |
| permissions: read-all | |
| jobs: | |
| get-test-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| services: ${{ steps.get-matrix.outputs.services }} | |
| nodes: ${{ steps.get-matrix.outputs.nodes }} | |
| steps: | |
| - name: Create Matrix | |
| id: get-matrix | |
| run: | | |
| 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 | |
| nodes=($(echo ${{ inputs.nodes }} | tr ',' ' ')) | |
| nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.') | |
| echo "nodes=$nodes_json" >> $GITHUB_OUTPUT | |
| else | |
| echo "nodes=[]" >> $GITHUB_OUTPUT | |
| fi | |
| run-services: | |
| needs: [get-test-matrix] | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.get-test-matrix.outputs.services) }} | |
| node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }} | |
| fail-fast: false | |
| uses: ./.github/workflows/_comps-workflow.yml | |
| with: | |
| service: ${{ matrix.service }} | |
| hardware: ${{ matrix.node }} | |
| tag: ${{ inputs.tag }} | |
| mode: ${{ inputs.mode }} | |
| test_compose: ${{ inputs.test_compose }} | |
| test_helmchart: ${{ inputs.test_helmchart }} | |
| secrets: inherit |