Comps CD workflow on manual event #224
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,animation,asr,chathistory,dataprep,embeddings,feedback_management,finetuning,guardrails,image2image,image2video,intent_detection,llms,lvms,prompt_registry,ragas,rerankings,retrievers,text2image,text2sql,third_parties,tts,vectorstores,web_retrievers]" | |
| required: true | |
| type: string | |
| build: | |
| default: true | |
| description: "Build test required images for Comps" | |
| required: false | |
| type: boolean | |
| image_build_nodes: | |
| default: "gaudi,xeon" | |
| description: "Build test required images for Comps on gaudi,xeon" | |
| required: true | |
| type: string | |
| 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 | |
| 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 | |
| use_model_cache: | |
| default: false | |
| description: "use model cache true or false" | |
| required: false | |
| type: boolean | |
| # permissions: read-all | |
| jobs: | |
| get-test-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| services: ${{ steps.get-matrix.outputs.services }} | |
| image_build_nodes: ${{ steps.get-matrix.outputs.image_build_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 | |
| image_build_nodes=($(echo ${{ inputs.image_build_nodes }} | tr ',' ' ')) | |
| image_build_nodes_json=$(printf '%s\n' "${image_build_nodes[@]}" | sort -u | jq -R '.' | jq -sc '.') | |
| echo "image_build_nodes=$image_build_nodes_json" >> $GITHUB_OUTPUT | |
| run-services: | |
| needs: [get-test-matrix] | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.get-test-matrix.outputs.services) }} | |
| fail-fast: false | |
| uses: ./.github/workflows/_comps-workflow.yml | |
| with: | |
| service: ${{ matrix.service }} | |
| image_build_nodes: ${{ needs.get-test-matrix.outputs.image_build_nodes }} | |
| tag: ${{ inputs.tag }} | |
| mode: ${{ inputs.mode }} | |
| test_compose: ${{ inputs.test_compose }} | |
| test_helmchart: ${{ inputs.test_helmchart }} | |
| use_model_cache: ${{ inputs.use_model_cache }} | |
| secrets: inherit |