cancel
Showing results for 
Search instead for 
Did you mean: 

MTA-Deployment to Cloud Foundry does not show Custom Action/Extensions

JulT
Explorer
0 Kudos

Hi all,

I developed a SAP Fiori Elements application (via RAP) on our ABAP Cloud system. I extended the Fiori App a little bit (e. g. I implemented a Custom Action, added a Button to a table, configured data loading when opening the App, ...).

When I test this App from Business Application Studio everything works fine. Same for my local deployment to the ABAP Cloud System itself.

Now we want to deploy this to our Cloud Foundry environment.

For this I right-clicked on the mta.yaml to "Build MTA Project". After building I right-clicked onto the mta archive to "Deploy MTA Archive". Both steps performed successfully. But now, when I'm opening the project all of my "extensions" are gone.

Here, the above table looks like this. As you can see, the Button will not be displayed.

My assumption is, that the zip-Archive in the resources folder, that is created via build/deploy just contains the folders "annotations" and "i18n". The "ext" folder where my custom controller/fragments are developed is missing.

But I did not find the place where to specify what should be zipped.

Or do I need to perform another step before deployment?

Do you have any idea what I'm missing/doing wrong?

Best wishes,

Julian

junwu
Active Contributor
0 Kudos

can you post your yaml file, that should tell what is included/excluded.

JulT
Explorer
0 Kudos

The mta.yaml? Sure

_schema-version: '3.2'
ID: commyappportal
description: Generated by Fiori Tools
version: 0.0.1
modules:
  - name: commyappportal-destination-content
    type: com.sap.application.content
    requires:
      - name: commyappportal-destination-service
        parameters:
          content-target: true
      - name: commyappportal-repo-host
        parameters:
          service-key:
            name: commyappportal-repo-host-key
      - name: commyappportal-uaa
        parameters:
          service-key:
            name: commyappportal-uaa-key
      - name: commyappportal-app-content
    parameters:
      content:
        instance:
          destinations:
            - Name: commyappportal_html_repo_host
              ServiceInstanceName: commyappportal-html5-srv
              ServiceKeyName: commyappportal-repo-host-key
              sap.cloud.service: commyappportal
            - Authentication: OAuth2UserTokenExchange
              Name: commyappportal_uaa
              ServiceInstanceName: commyappportal-xsuaa-srv
              ServiceKeyName: commyappportal-uaa-key
              sap.cloud.service: commyappportal
          existing_destinations_policy: ignore
    build-parameters:
      no-source: true
  - name: commyappportal-app-content
    type: com.sap.application.content
    path: .
    requires:
      - name: commyappportal-repo-host
        parameters:
          content-target: true
    build-parameters:
      build-result: resources
      requires:
        - artifacts:
            - commyappportal.zip
          name: commyappportal
          target-path: resources/
  - name: commyappportal
    type: html5
    path: .
    build-parameters:
      build-result: dist
      builder: custom
      commands:
        - npm install
        - 'npm run build:cf'
      supported-platforms: []
resources:
  - name: commyappportal-destination-service
    type: org.cloudfoundry.managed-service
    parameters:
      config:
        HTML5Runtime_enabled: true
        init_data:
          instance:
            destinations:
              - Authentication: NoAuthentication
                Name: ui5
                ProxyType: Internet
                Type: HTTP
                URL: 'https://ui5.sap.com'
            existing_destinations_policy: update
        version: 0.0.1
      service: destination
      service-name: commyappportal-destination-service
      service-plan: lite
  - name: commyappportal-uaa
    type: org.cloudfoundry.managed-service
    parameters:
      path: ./xs-security.json
      service: xsuaa
      service-name: commyappportal-xsuaa-srv
      service-plan: application
  - name: commyappportal-repo-host
    type: org.cloudfoundry.managed-service
    parameters:
      service: html5-apps-repo
      service-name: commyappportal-html5-srv
      service-plan: app-host
parameters:
  deploy_mode: html5-repo
  enable-parallel-deployments: true
In the console I saw, that the process is trying to copy everything matching "commyappportal.zip" from the /dist folder to the resources. Currently no such file is being created (anymore). I do not know I i broke this by trying out to fix my problem or if the build process does not zip properly...
These are my scripts of the package.json
        "start": "fiori run --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#commyappportal-tile\"",
        "start-local": "fiori run --config ./ui5-local.yaml --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#commyappportal-tile\"",
        "build": "ui5 build --config=ui5.yaml --clean-dest --dest dist",
        "deploy": "npm run build && fiori deploy --config ui5-deploy.yaml && rimraf archive.zip",
        "deploy-config": "fiori add deploy-config",
        "start-noflp": "fiori run --open \"index.html?sap-ui-xx-viewCache=false\"",
        "start-mock": "fiori run --config ./ui5-mock.yaml --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#commyappportal-tile\"",
        "int-test": "fiori run --config ./ui5-mock.yaml --open \"test/integration/opaTests.qunit.html\"",
        "start-variants-management": "fiori run --open \"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\"",
        "undeploy": "fiori undeploy --config ui5-deploy.yaml",
        "deploy-test": "npm run build && fiori deploy --config ui5-deploy.yaml --testMode true",
        "build:cf": "ui5 build preload --clean-dest --config ui5.yaml --include-task=generateManifestBundle generateCachebusterInfo",
        "build:mta": "rimraf resources mta_archives && mbt build"

Accepted Solutions (1)

Accepted Solutions (1)

JulT
Explorer
0 Kudos

Okay, I solved it by myself.

I'm only familiar with the onPrem Deployment. I didn't create a Multitarget Application and created a MTA Module from Template rather I just created the Fiori App directly and deployed it to CF. Maybe that was my error.

Now with the MTA Project, the MTA Module from Template I was able to build and deploy and to see my extensions I created.

Answers (0)