-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
121 lines (119 loc) · 4.16 KB
/
action.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: 'kubernetes-deploy-pilot'
author: 'jonathan.duval@cheerz'
description: 'An action to control and apply deployment on k8s cluster based on istio virtual service.'
branding:
icon: 'upload'
color: 'blue'
inputs:
version-to-deploy:
description: 'The new version release you want to deploy'
required: true
application-name:
description: 'the name of the application you want to deploy'
required: true
action:
description: 'Deploy action to apply (create|complete|update|cancel)'
required: false
namespace:
description: 'Namespace of the application'
required: false
default: "staging"
applicationValuePath:
description: 'Path of application value file'
required: false
default: ""
networkValuePath:
description: 'Path of network value file'
required: false
default: ""
workerValuePath:
description: 'Path of worker value file'
required: false
default: ""
cronJobsValuePath:
description: 'Path of cron jobs value file'
required: false
default: ""
commonValuePath:
description: 'Path of common value file'
required: false
default: ""
useApplicationVersionForImageTag:
description: 'Do we use the new application version to set the docker image tag'
required: false
default: "false"
forceScaleNewVersion:
description: 'Do we scale the new version with the running version pod number'
required: false
default: "false"
scaleDownPreviousVersion:
description: 'Scale down the previous version to reduce ressources consumptions'
required: false
default: "false"
ApplicationChartVersion:
description: 'Version to use for application chart'
required: false
default: "latest"
networkChartVersion:
description: 'Version to use for network chart'
required: false
default: "latest"
workerChartVersion:
description: 'Version to use for worker chart'
required: false
default: "latest"
cronJobsChartVersion:
description: 'Version to use for cron jobs chart'
required: false
default: "latest"
github-id:
description: 'Application github repo id'
required: false
default: "0"
github-path:
description: 'Application github repo path'
required: false
default: "/"
github-url:
description: 'Application github repo url'
required: false
default: "https://github.com"
jf-access-token:
description: 'Application jf token'
required: true
outputs:
new-version:
description: "Return the new version number deployed"
value: ${{ steps.main.outputs.new-version}}
actual-version:
description: "Previous running version or v0.0.0 in case of new deployment OR equal to new-version in case of complete deployment"
value: ${{ steps.main.outputs.actual-version}}
runs:
using: "composite"
steps:
- id: main
env:
BASE_WORKING_PATH: "${{ github.workspace }}"
run: |
${{ github.action_path }}/main.sh \
--application-image-tag="${{ inputs.useApplicationVersionForImageTag }}" \
--force-scale-new-version="${{ inputs.forceScaleNewVersion }}" \
--scale-down-previous-version="${{ inputs.scaleDownPreviousVersion }}" \
--action="${{ inputs.action }}" \
--namespace="${{ inputs.namespace }}" \
--version-deploy="${{ inputs.version-to-deploy }}" \
--app-value-path="${{ inputs.applicationValuePath }}" \
--network-value-path="${{ inputs.networkValuePath }}" \
--worker-value-path="${{ inputs.workerValuePath }}" \
--common-value-path="${{ inputs.commonValuePath }}" \
--cron-jobs-value-path="${{ inputs.cronJobsValuePath }}" \
--app-chart-version="${{ inputs.ApplicationChartVersion }}" \
--network-chart-version="${{ inputs.networkChartVersion }}" \
--worker-chart-version="${{ inputs.workerChartVersion }}" \
--cron-jobs-chart-version="${{ inputs.cronJobsChartVersion }}" \
--github-id="${{ inputs.github-id }}" \
--github-path="${{ inputs.github-path }}" \
--github-url="${{ inputs.github-url }}" \
--jf-access-token="${{ inputs.jf-access-token }}" \
${{ inputs.application-name }}
shell: bash