How to exclude README.md and accelerator-log.md being generated by Application Accelerators
search cancel

How to exclude README.md and accelerator-log.md being generated by Application Accelerators

book

Article ID: 297903

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

Customer need to place their own README.md of the project to the Git repo, thus they would like to exclude README.md and accelerator-log.md being generated when generating an application project with Accelerator.

Environment

Product Version: 1.5

Resolution

The README is just a regular file generated by the accelerator itself, which can be excluded using the engine transforms. By adding exclude: [ "README.md" ] in the engine section of accelerator.yaml, README.md will not be generated. Example as below:
engine:
   merge:
     - include: [ "**" ]
       exclude: [ "README.md" ]

If the fragment has been used in the accelerator.yaml, it is indeed the README from the fragment that gets contributed to the end result. To excluded it you could add an  - exclude: ["README.md"] in the chain after the InvokeFragment. Example as below: 

engine:
  merge:
    - include: ["**/workload.yaml"]
      chain:
        - type: InvokeFragment
          reference: <Fragment-name>
        - exclude: ["README.md"]

More details can refer to doc: 
- https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-creating-accelerators-accelerator-yaml.html#engine-notation-descriptions-6
- https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/application-accelerator-best-practices-fragments.html#housekeeping-rules-2

Last but not least, the accelerator-log.md is always generated so far, there is currently no way to prevent from being generated.