-
Notifications
You must be signed in to change notification settings - Fork 3
121 lines (116 loc) · 3.64 KB
/
deploy_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Build and push Docker images
on:
push:
branches:
- 'master'
tags:
- 'v*'
workflow_dispatch:
inputs:
branch:
type: string
default: master
description: Branch to build images from
required: false
gateway:
type: boolean
default: true
description: Build new image of api-gateway
required: false
backend:
type: boolean
default: true
description: Build new image of save-backend
required: false
frontend:
type: boolean
default: true
description: Build new image of save-frontend
required: false
orchestrator:
type: boolean
default: true
description: Build new image of save-orchestrator
required: false
preprocessor:
type: boolean
default: true
description: Build new image of save-preprocessor
required: false
demo:
type: boolean
default: true
description: Build new image of save-demo
required: false
demo-cpg:
type: boolean
default: true
description: Build new image of save-demo-cpg
required: false
jobs:
build_cli:
name: Build save-cli
uses: ./.github/workflows/build_save-cli_reusable.yml
build_agents:
name: Build save-agent and save-demo-agent
uses: ./.github/workflows/build_save-agent_reusable.yml
with:
branch: ${{ inputs.branch }}
build-save-agent: ${{ github.event_name != 'workflow_dispatch' || inputs.backend }}
build-save-demo-agent: ${{ github.event_name != 'workflow_dispatch' || inputs.demo }}
deploy_backend:
name: save-backend
uses: ./.github/workflows/deploy_images_reusable.yml
needs: [ build_cli, build_agents ]
with:
module: save-backend
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.backend }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: ${{ needs.build_cli.outputs.version }}
deploy_demo:
name: save-demo
uses: ./.github/workflows/deploy_images_reusable.yml
needs: build_agents
with:
module: save-demo
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.demo }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: stub
deploy_all:
name: all excluding save-backend and save-demo
strategy:
fail-fast: false
matrix:
module: [
'cosv-backend',
'api-gateway',
'save-frontend',
'cosv-frontend',
'save-orchestrator',
'save-preprocessor',
'save-demo-cpg',
]
include:
- module: cosv-backend
do-build: ${{ inputs.backend }}
- module: api-gateway
do-build: ${{ inputs.gateway }}
- module: save-frontend
do-build: ${{ inputs.frontend }}
- module: cosv-frontend
do-build: ${{ inputs.frontend }}
- module: save-orchestrator
do-build: ${{ inputs.orchestrator }}
- module: save-preprocessor
do-build: ${{ inputs.preprocessor }}
- module: save-demo-cpg
do-build: ${{ inputs.demo-cpg }}
uses: ./.github/workflows/deploy_images_reusable.yml
with:
module: ${{ matrix.module }}
branch: ${{ inputs.branch }}
do-build: ${{ github.event_name != 'workflow_dispatch' || matrix.do-build }}
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }}
save-cli-version: stub