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 3
/
Copy pathaccelerator.yaml
93 lines (91 loc) · 2.75 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
accelerator:
displayName: Spring Boot SQL JPA
description: Spring Boot application that accesses an SQL database using JPA. Option to include service binding to PosgreSQL database.
iconUrl: https://raw.githubusercontent.com/sample-accelerators/icons/master/icon-data.png
tags:
- java
- spring
- jpa
- sql
- tanzu
# options for the UI
options:
- name: deploymentType
inputType: select
choices:
- value: workload
text: TAP workload using PostgreSQL with service-binding
- value: none
text: Skip Kubernetes deployment
defaultValue: workload
required: true
- name: postgresInstanceName
inputType: text
label: The name of the Postgres instance
description: The name of the Postgres instance to create using the Tanzu Postgres Operator
defaultValue: postgres-sample
dependsOn:
name: deploymentType
value: workload
- name: storageClassName
inputType: text
label: The name of the storage class to use for the Postgres instance
description: The name of the storage class to use for Postgres instance to create using the Tanzu Postgres Operator
defaultValue: standard
dependsOn:
name: deploymentType
value: workload
engine:
merge:
- include: [ "**" ]
exclude: [ "pom.xml", "database/**", "config/**", "catalog/**", "README.md", "DEPLOYING.md" ]
- include: [ "pom.xml" ]
chain:
- type: ReplaceText
substitutions:
- text: spring-sql-jpa
with: "#artifactId"
- include: [ "database/**" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: postgres-sample
with: "#postgresInstanceName"
- type: ReplaceText
substitutions:
- text: standard
with: "#storageClassName"
- include: [ "catalog/**" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: spring-sql-jpa
with: "#artifactId"
- include: [ "config/**" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: ": spring-sql-jpa"
with: "': ' + #artifactId"
- name: README
type: Combo
onConflict: Append
sources:
- include: [ "README.md" ]
chain:
- type: ReplaceText
substitutions:
- text: spring-sql-jpa
with: "#artifactId"
- include: [ "DEPLOYING.md" ]
condition: "#deploymentType == 'workload'"
chain:
- type: ReplaceText
substitutions:
- text: spring-sql-jpa
with: "#artifactId"
- type: RewritePath
rewriteTo: "'README.md'"