106 lines
3.0 KiB
YAML
106 lines
3.0 KiB
YAML
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Example jobs
|
|
permissions: read-all
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
node:
|
|
required: true
|
|
type: string
|
|
example:
|
|
required: true
|
|
type: string
|
|
services:
|
|
default: ""
|
|
required: false
|
|
type: string
|
|
tag:
|
|
default: "latest"
|
|
required: false
|
|
type: string
|
|
build:
|
|
default: true
|
|
required: false
|
|
type: boolean
|
|
test_compose:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
test_helmchart:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
test_gmc:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
opea_branch:
|
|
default: "main"
|
|
required: false
|
|
type: string
|
|
inject_commit:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
use_model_cache:
|
|
default: false
|
|
required: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
####################################################################################################
|
|
# Image Build
|
|
####################################################################################################
|
|
build-images:
|
|
uses: ./.github/workflows/_build_image.yml
|
|
with:
|
|
node: ${{ inputs.node }}
|
|
build: ${{ fromJSON(inputs.build) }}
|
|
example: ${{ inputs.example }}
|
|
services: ${{ inputs.services }}
|
|
tag: ${{ inputs.tag }}
|
|
opea_branch: ${{ inputs.opea_branch }}
|
|
inject_commit: ${{ inputs.inject_commit }}
|
|
|
|
####################################################################################################
|
|
# Docker Compose Test
|
|
####################################################################################################
|
|
test-example-compose:
|
|
needs: [build-images]
|
|
if: ${{ inputs.test_compose }}
|
|
uses: ./.github/workflows/_run-docker-compose.yml
|
|
with:
|
|
tag: ${{ inputs.tag }}
|
|
example: ${{ inputs.example }}
|
|
hardware: ${{ inputs.node }}
|
|
use_model_cache: ${{ inputs.use_model_cache }}
|
|
secrets: inherit
|
|
|
|
|
|
####################################################################################################
|
|
# helmchart Test
|
|
####################################################################################################
|
|
test-helmchart:
|
|
if: ${{ fromJSON(inputs.test_helmchart) }}
|
|
uses: ./.github/workflows/_helm-e2e.yml
|
|
with:
|
|
example: ${{ inputs.example }}
|
|
hardware: ${{ inputs.node }}
|
|
tag: ${{ inputs.tag }}
|
|
mode: "CD"
|
|
secrets: inherit
|
|
|
|
####################################################################################################
|
|
# GMC Test
|
|
####################################################################################################
|
|
test-gmc-pipeline:
|
|
needs: [build-images]
|
|
if: false # ${{ fromJSON(inputs.test_gmc) }}
|
|
uses: ./.github/workflows/_gmc-e2e.yml
|
|
with:
|
|
example: ${{ inputs.example }}
|
|
hardware: ${{ inputs.node }}
|
|
secrets: inherit
|