Skip to content

Commit 63ff4a0

Browse files
committed
update deploy_gmc logical in cd workflow (#627)
* update deploy_gmc logical Signed-off-by: chensuyue <suyue.chen@intel.com> * bug fix Signed-off-by: chensuyue <suyue.chen@intel.com> * add always() for run-examples Signed-off-by: chensuyue <suyue.chen@intel.com> * bug fix Signed-off-by: chensuyue <suyue.chen@intel.com> --------- Signed-off-by: chensuyue <suyue.chen@intel.com> (cherry picked from commit c016d82)
1 parent 2f8a54a commit 63ff4a0

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.github/workflows/_gmc-workflow.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ on:
1616
required: true
1717
type: string
1818
description: "Hardware to run test"
19-
deploy:
20-
default: true
21-
required: true
22-
type: boolean
23-
description: 'Whether to deploy gmc'
19+
opea_branch:
20+
default: "main"
21+
required: false
22+
type: string
23+
description: 'OPEA branch for image build'
2424
workflow_call:
2525
inputs:
2626
tag:
@@ -33,11 +33,11 @@ on:
3333
required: true
3434
type: string
3535
description: "Hardware to run test"
36-
deploy:
37-
default: true
38-
required: true
39-
type: boolean
40-
description: 'Whether to deploy gmc'
36+
opea_branch:
37+
default: "main"
38+
required: false
39+
type: string
40+
description: 'OPEA branch for image build'
4141

4242
jobs:
4343
####################################################################################################
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions/checkout@v4
5151
with:
5252
repository: opea-project/GenAIInfra
53-
ref: ${{ inputs.tag }}
53+
ref: ${{ inputs.opea_branch }}
5454
path: GenAIInfra
5555

5656
- name: Set variables
@@ -113,14 +113,13 @@ jobs:
113113
####################################################################################################
114114
gmc-install:
115115
needs: image-build
116-
if: ${{ fromJSON(inputs.deploy) }}
117116
runs-on: "k8s-${{ inputs.node }}"
118117
steps:
119118
- name: Checkout GenAIInfra repository
120119
uses: actions/checkout@v4
121120
with:
122121
repository: opea-project/GenAIInfra
123-
ref: ${{ inputs.tag }}
122+
ref: ${{ inputs.opea_branch }}
124123
path: GenAIInfra
125124

126125
- name: Set variables

.github/workflows/manual-example-workflow.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ on:
4545
description: 'Test examples with k8s'
4646
required: false
4747
type: boolean
48+
test_gmc:
49+
default: false
50+
description: 'Test examples with gmc'
51+
required: false
52+
type: boolean
4853
opea_branch:
4954
default: "main"
5055
description: 'OPEA branch for image build'
@@ -70,6 +75,8 @@ jobs:
7075
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
7176
7277
build-deploy-gmc:
78+
needs: [get-test-matrix]
79+
if: ${{ fromJSON(inputs.deploy_gmc) }}
7380
strategy:
7481
matrix:
7582
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
@@ -78,11 +85,12 @@ jobs:
7885
with:
7986
node: ${{ matrix.node }}
8087
tag: ${{ inputs.tag }}
81-
deploy: ${{ fromJSON(inputs.deploy_gmc) }}
88+
opea_branch: ${{ inputs.opea_branch }}
8289
secrets: inherit
8390

8491
run-examples:
85-
needs: [get-test-matrix]
92+
needs: [get-test-matrix, build-deploy-gmc]
93+
if: always()
8694
strategy:
8795
matrix:
8896
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
@@ -97,5 +105,6 @@ jobs:
97105
scan: ${{ fromJSON(inputs.scan) }}
98106
test_compose: ${{ fromJSON(inputs.test_compose) }}
99107
test_k8s: ${{ fromJSON(inputs.test_k8s) }}
108+
test_gmc: ${{ fromJSON(inputs.test_gmc) }}
100109
opea_branch: ${{ inputs.opea_branch }}
101110
secrets: inherit

0 commit comments

Comments
 (0)