https://developers.sap.com/tutorials/btp-app-cap-mta-deployment..html
cds add mta
build-parameters:
before-all:
- builder: custom
commands:
- npm install --production
- npx -p @sap/cds-dk cds build --production
- npx rimraf gen/db/src/gen/data
modules:
- name: cpapp-srv
...
requires:
- name: cpapp-db
- name: cpapp-uaa
resources:
...
- name: cpapp-uaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config:
xsappname: cpapp-${space} # name + space dependency
tenant-mode: dedicated
role-collections:
- name: 'RiskManager-${space}'
description: Manage Risks
role-template-references:
- $XSAPPNAME.RiskManager
- name: 'RiskViewer-${space}'
description: View Risks
role-template-references:
- $XSAPPNAME.RiskViewer
Build the MTA module from your project root folder:
mbt build -t ./
Deploy the module to your current Cloud Foundry space:
cf deploy cpapp_1.0.0.mtar