Skip to content

update deploy_gmc logical in cd workflow #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 19, 2024
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
25 changes: 12 additions & 13 deletions .github/workflows/_gmc-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ on:
required: true
type: string
description: "Hardware to run test"
deploy:
default: true
required: true
type: boolean
description: 'Whether to deploy gmc'
opea_branch:
default: "main"
required: false
type: string
description: 'OPEA branch for image build'
workflow_call:
inputs:
tag:
Expand All @@ -33,11 +33,11 @@ on:
required: true
type: string
description: "Hardware to run test"
deploy:
default: true
required: true
type: boolean
description: 'Whether to deploy gmc'
opea_branch:
default: "main"
required: false
type: string
description: 'OPEA branch for image build'

jobs:
####################################################################################################
Expand All @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: opea-project/GenAIInfra
ref: ${{ inputs.tag }}
ref: ${{ inputs.opea_branch }}
path: GenAIInfra

- name: Set variables
Expand Down Expand Up @@ -113,14 +113,13 @@ jobs:
####################################################################################################
gmc-install:
needs: image-build
if: ${{ fromJSON(inputs.deploy) }}
runs-on: "k8s-${{ inputs.node }}"
steps:
- name: Checkout GenAIInfra repository
uses: actions/checkout@v4
with:
repository: opea-project/GenAIInfra
ref: ${{ inputs.tag }}
ref: ${{ inputs.opea_branch }}
path: GenAIInfra

- name: Set variables
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/manual-example-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ on:
description: 'Test examples with k8s'
required: false
type: boolean
test_gmc:
default: false
description: 'Test examples with gmc'
required: false
type: boolean
opea_branch:
default: "main"
description: 'OPEA branch for image build'
Expand All @@ -70,6 +75,8 @@ jobs:
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT

build-deploy-gmc:
needs: [get-test-matrix]
if: ${{ fromJSON(inputs.deploy_gmc) }}
strategy:
matrix:
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
Expand All @@ -78,11 +85,12 @@ jobs:
with:
node: ${{ matrix.node }}
tag: ${{ inputs.tag }}
deploy: ${{ fromJSON(inputs.deploy_gmc) }}
opea_branch: ${{ inputs.opea_branch }}
secrets: inherit

run-examples:
needs: [get-test-matrix]
needs: [get-test-matrix, build-deploy-gmc]
if: always()
strategy:
matrix:
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
Expand All @@ -97,5 +105,6 @@ jobs:
scan: ${{ fromJSON(inputs.scan) }}
test_compose: ${{ fromJSON(inputs.test_compose) }}
test_k8s: ${{ fromJSON(inputs.test_k8s) }}
test_gmc: ${{ fromJSON(inputs.test_gmc) }}
opea_branch: ${{ inputs.opea_branch }}
secrets: inherit
Loading