This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaccelerator.yaml
128 lines (126 loc) · 3.65 KB
/
accelerator.yaml
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
122
123
124
125
126
127
128
accelerator:
displayName: Hello Fun
description: A simple Spring Cloud Function serverless app
iconUrl: https://raw.githubusercontent.com/sample-accelerators/icons/master/icon-cloud.png
tags:
- java
- spring
- cloud
- function
- serverless
- tanzu
# options for the UI
options:
- name: deploymentType
inputType: select
label: Deployment type
choices:
- value: workload
text: TAP workload
- value: k8s-simple
text: Kubernetes deployment and service
- value: none
text: Skip Kubernetes deployment
defaultValue: workload
required: true
- name: sourceRepositoryPrefix
inputType: text
label: The source repository prefix to use when pushing the source
description: The prefix for the repository where source can be stored during development
defaultValue: dev.local
dependsOn:
name: deploymentType
value: workload
imports:
- name: java-version
engine:
chain:
- merge:
- include: [ "**" ]
exclude: [ "pom.xml", "README.md", "grype.yaml", "kubernetes/**", "catalog/*.yaml", ".github/workflows/**" ]
- include: [ "pom.xml" ]
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- include: [ "kubernetes/k8s/deployment.yaml", "kubernetes/k8s/service.yaml" ]
condition: "#deploymentType == 'k8s-simple'"
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- type: RewritePath
rewriteTo: "'kubernetes/' + #filename"
- include: [ "kubernetes/k8s/Tiltfile" ]
condition: "#deploymentType == 'k8s-simple'"
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- type: RewritePath
rewriteTo: "#filename"
- include: [ "kubernetes/tap/workload.yaml" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: ": hello-fun"
with: "': ' + #artifactId"
- type: RewritePath
rewriteTo: "'config/' + #filename"
- include: [ "kubernetes/tap/Tiltfile" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- type: ReplaceText
substitutions:
- text: dev.local
with: "#sourceRepositoryPrefix"
- type: RewritePath
rewriteTo: "#filename"
- include: [ "kubernetes/tap/.tanzuignore" ]
condition: "#deploymentType == 'workload'"
chain:
- type: RewritePath
rewriteTo: "#filename"
- include: [ "catalog/*.yaml" ]
condition: "#deploymentType != 'none'"
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- name: README
type: Combo
onConflict: Append
sources:
- include: [ "README.md"]
chain:
- type: ReplaceText
substitutions:
- text: hello-fun template repo
with: "#artifactId"
- include: [ "kubernetes/k8s/DEPLOYING.md" ]
condition: "#deploymentType == 'k8s-simple'"
chain:
- type: RewritePath
rewriteTo: "'README.md'"
- include: [ "kubernetes/tap/DEPLOYING.md" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: hello-fun
with: "#artifactId"
- type: RewritePath
rewriteTo: "'README.md'"
- merge:
- include: [ "**" ]
- type: InvokeFragment
reference: java-version