You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_As a persona,
As a Fiori developer using a Fiori application within a NodeJS CAP project, I'd like to be able to add deployment configuration even if there isn't already an MTA.yaml file in my CAP project.
Description
Currently, the deployment config generator prohibits users from adding deployment config if there isn't already an MTA.yaml file in the associated CAP project. The requirement is to allow the Fiori deployment generator to optionally allow the user to create an MTA file on the fly as part of the deployment configuration, if none already exists, and then permit the user to add the Fiori deployment configuration to that MTA file.
Description
Generate an MTA configuration and supporting deployment configurations, similar to the sample CAP apps shown here;
There is an existing method called generateBaseConfig which will generate a base configuration using predefined templates and scripts. We need to leverage the cds package to generate and append services, for example;
cds init captestproject
cds add mta xsuaa destination html5-repo
This will generate a mta.yaml with specific resources solely used for CAP projects. For example, the destination service will append a destination instance with the CAP server API exposed to allow HTML5 apps to consume the CAP OData services when deployed to CF.
To invoke this method generateCAPConfig, the user should be provided with a new prompt rather than existing the process showing the error that you cant add a deployment configuration since its missing MTA.
Existing error shown;
[2025-02-05 15:27:25] ERROR: The SAP Fiori application is within a CAP project and deployment should be configured as part of the CAP project. Please ensure you have a mta.yaml file defined for this project.
Here is a sample screenshot of the new prompt;
The sample text;
There is no mta.yaml file defined for this project. In order to add deployment configuration for this application, this file must be present. Do you want to create an mta.yaml to continue?
Technical Design
enhance cf-config-writer
enhance @sap-ux/cf-deploy-config-sub-generator
expose a new generate method to specifically handle CAP mta
expose a new prompt to handle CAP project and missing MTA
Given I have an existing CAP project with no existing mta.yaml when I execute the CAP generate method, selecting either managed or standalone approuter then the appropriate deployment configuration is appended to the CAP project and deloy & undeploy scripts are appended to the root package.json
Given I have an existing CAP project with no existing mta.yaml when I execute the deployment generator to append deployment configuration then give the user a new prompt, asking them if they want to append an MTA configuration mandated | standalone to their CAP project
Notes
Tasks
Expose a new method called generateCAPConfig to encapsulate the CAP flow
Leverage existing functionality to handle updating existing configurations i.e. package.json, to append any missing scripts
Update @sap-ux/cf-deploy-config-sub-generator to allow deployment config to be added a CAP project if missing mta
Update unit tests to reflect changes
Test Cases defined and reflect deploying to a CF system
The text was updated successfully, but these errors were encountered:
_As a persona,
As a Fiori developer using a Fiori application within a NodeJS CAP project, I'd like to be able to add deployment configuration even if there isn't already an MTA.yaml file in my CAP project.
Description
Currently, the deployment config generator prohibits users from adding deployment config if there isn't already an MTA.yaml file in the associated CAP project. The requirement is to allow the Fiori deployment generator to optionally allow the user to create an MTA file on the fly as part of the deployment configuration, if none already exists, and then permit the user to add the Fiori deployment configuration to that MTA file.
Description
Generate an MTA configuration and supporting deployment configurations, similar to the sample CAP apps shown here;
https://github.com/SAP-samples/fiori-tools-samples/tree/main/cap
There is an existing method called
generateBaseConfig
which will generate a base configuration using predefined templates and scripts. We need to leverage thecds
package to generate and append services, for example;This will generate a
mta.yaml
with specific resources solely used for CAP projects. For example, the destination service will append a destination instance with the CAP server API exposed to allow HTML5 apps to consume the CAP OData services when deployed to CF.To invoke this method
generateCAPConfig
, the user should be provided with a new prompt rather than existing the process showing the error that you cant add a deployment configuration since its missing MTA.Existing error shown;
Here is a sample screenshot of the new prompt;
The sample text;
Technical Design
cf-config-writer
@sap-ux/cf-deploy-config-sub-generator
Acceptance Criteria
GivenWhenThen format (https://martinfowler.com/bliki/GivenWhenThen.html)
Given I have an existing CAP project with no existing mta.yaml
when I execute the CAP generate method, selecting either managed or standalone approuter
then the appropriate deployment configuration is appended to the CAP project and deloy & undeploy scripts are appended to the root package.json
Given I have an existing CAP project with no existing mta.yaml
when I execute the deployment generator to append deployment configuration
then give the user a new prompt, asking them if they want to append an MTA configuration mandated | standalone to their CAP project
Notes
Tasks
generateCAPConfig
to encapsulate the CAP flowThe text was updated successfully, but these errors were encountered: