Skip to content

Commit

Permalink
The catalog name will be replaced by the supplied artifactId.
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Belyaev <dbelyaev@vmware.com>
  • Loading branch information
2 people authored and trisberg committed Sep 23, 2022
1 parent 70bde26 commit 9ab8f7d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 19 deletions.
28 changes: 23 additions & 5 deletions appsso-starter-java/accelerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,26 @@ accelerator:
- name: tap-workload

engine:
merge:
- type: InvokeFragment
reference: tap-workload
- include: [ "**" ]
onConflict: UseFirst
chain:
- merge:
- include: [ "**" ]
exclude: [ "catalog/*.yaml", "config/workload.yaml" ]
- include: [ "catalog/*.yaml" ]
chain:
- type: ReplaceText
substitutions:
- text: "appsso-starter-java"
with: "#artifactId.toLowerCase()"
- include: [ "config/workload.yaml" ]
chain:
- type: ReplaceText
substitutions:
- text: "\n name: appsso-starter-java"
with: "'\n name: ' + #artifactId.toLowerCase()"
- text: "app.kubernetes.io/part-of: appsso-starter-java"
with: "'app.kubernetes.io/part-of: ' + #artifactId.toLowerCase()"
- merge:
- type: InvokeFragment
reference: tap-workload
- include: [ "**" ]
onConflict: UseFirst
1 change: 0 additions & 1 deletion appsso-starter-java/catalog/catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
description: Spring Boot application that supports single sign-on (SSO) via Spring Security OAuth 2 Client library.
tags:
- sso
- app-accelerator
- authentication
- openid
- spring
Expand Down
8 changes: 0 additions & 8 deletions java-rest-service/accelerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,6 @@ engine:
substitutions:
- text: "rest-service-db"
with: "#workloadResourceName"
# - type: ReplaceText
# substitutions:
# - text: "customer-profile-database"
# with: "#databaseResourceName"
# - type: ReplaceText
# substitutions:
# - text: "customerprofiledatabase"
# with: "#databaseName"
- merge:
- type: InvokeFragment
reference: java-version
Expand Down
22 changes: 19 additions & 3 deletions spring-smtp-gateway/accelerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ accelerator:
engine:
merge:
- exclude:
["**/templates/**", "**/icons/**", "**/.git/**"]
["**/templates/**", "**/icons/**", "**/.git/**", "**/catalog/catalog.yaml"]
- include: ["**/config/workload.yaml", "**/templates/workloads.template"]
chain:
- type: ReplaceText
Expand All @@ -81,10 +81,26 @@ engine:
- text: "1026"
with: "#containerPort"
- text: "25"
with: "#servicePort"
with: "#servicePort"
- text: "name: smtp-gateway"
with: "'name: ' + #artifactId.toLowerCase() + '-smtp-gateway'"
- text: "name: smtp-sink"
with: "'name: ' + #artifactId.toLowerCase() + '-smtp-sink'"
- text: "app.kubernetes.io/part-of: spring-smtp-gateway"
with: "'app.kubernetes.io/part-of: ' + #artifactId.toLowerCase()"
- type: RewritePath
regex: 'templates/workloads.template'
rewriteTo: "'config/developer/workloads.yaml'"
rewriteTo: "'config/developer/workloads.yaml'"
- include: [ "**/catalog/catalog.yaml" ]
chain:
- type: ReplaceText
substitutions:
- text: "name: smtp-gateway"
with: "'name: ' + #artifactId.toLowerCase() + '-smtp-gateway'"
- text: "name: smtp-sink"
with: "'name: ' + #artifactId.toLowerCase() + '-smtp-sink'"
- text: "app.kubernetes.io/part-of=spring-smtp-gateway"
with: "'app.kubernetes.io/part-of=' + #artifactId.toLowerCase()"
- condition:
"#createRabbitMQCluster"
include: ["**/rmqCluster.template"]
Expand Down
2 changes: 1 addition & 1 deletion spring-smtp-gateway/smtp-gateway/catalog/catalog.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: smpt-gateway
name: smtp-gateway
description: SMTP server application
tags:
- tanzu
Expand Down
2 changes: 1 addition & 1 deletion spring-smtp-gateway/smtp-sink/catalog/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: smtp-sink
description: A sink/desitination for SMTP Mime messages.
description: A sink/destination for SMTP Mime messages.
tags:
- tanzu
links:
Expand Down

0 comments on commit 9ab8f7d

Please sign in to comment.