Skip to Content
Technical Articles

UI5 Tooling Custom Task to deploy UI5 sources to an ABAP server

In the past Grunt was used as main task runner for the UI5 development process. In a build pipeline a deployment step is an important functionality to be able to deploy builded and tested sources automatically to test and even production system. In the UI5 area for that the grunt-nwabap-ui5uploader Grunt task could be used.

But as time and technology always involves, the new UI5 Tooling is going to replace Grunt as build tool for UI5 applications. To support the deployment process of UI5 sources to an ABAP server directly with the UI5 Tooling (without mixing different tools), the UI5 Tooling custom task ui5-task-nwabap-deployer is provided.

Details about the options and how to use it can be found in the Github repository: https://github.com/pfefferf/ui5-nwabap-deployer/tree/master/packages/ui5-task-nwabap-deployer

21 Comments
You must be Logged on to comment or reply to a post.
    • There are no specific UI5 tooling tasks available yet. But it can be simply done using the SAP Cloud Platform Console Client for Neo or the Cloud Foundry CLI for CF.

  • Florian, thanks you for your work on this. I’ve followed the steps, but I get the error

     

    “Error: taskRepository: Unknown Task ui5-task-nwabap-deployer”

     

    when running “ui5 build”

     

    Any ideas what could be missing?

      • Yep, like this:

         

        {
          "name": "cts-worklist",
          "version": "1.0.4",
          "description": "CTS Worklist",
          "devDependencies": {
            "@sap/ui5-builder-webide-extension": "1.0.5",
            "@ui5/cli": "1.7.0",
            "nwabap-ui5uploader": "^0.3.4",
            "ui5-task-nwabap-deployer": "*"
          },
          "scripts": {
            "build": "ui5 build --include-task=generateManifestBundle generateCachebusterInfo"
          },
          "ui5": {
            "dependencies": [
              "@sap/ui5-builder-webide-extension",
              "ui5-task-nwabap-deployer"
            ]
          },
          "repository": {
            "type": "git",
            "url": "git+https://github.com/Equinor/CTSWorklist.git"
          },
          "author": "Frank Stødle",
          "license": "ISC",
          "bugs": {
            "url": "https://github.com/Equinor/CTSWorklist/issues"
          },
          "homepage": "https://github.com/Equinor/CTSWorklist#readme",
          "dependencies": {
            "express": "^4.16.4",
            "morgan": "^1.9.1",
            "request": "^2.88.0"
          }
        }
  • I am getting “Connection error has occurred” from the deploy task.

    When I run the “nwabap upload” from the command line with the same parameters it works as expected.

    Any ideas?

    /
  • Hi Florian,

    It looks like the dist folder is created after the task. The first time i run

    ui5 serve

    The application is deployed without any files. The second time ( since the folder dist is already there ) the files are uploaded.

    Since i’m using the script:

    rimraf dist && ui5 build  --dest dist/webapp

    no files are uploaded.

    Any ideas?

     

    Best regards,

  • Hello Florian,

    Am I right in saying you cannot authenticate with ui5-task-nwabap-deployer when a user name has a numeric value ?

    I have been struggling to authenticate because all our user id’s are numeric and start with a leading ‘0’. I thought initially that the leading ‘0’ was the cause but it appears no numeric user works ?

    Thanks and best regards,

    Nelis

    • Hi Nelis Lamprecht ,

      no, it should work. I tried it with a user 0999888 for instance and it worked in both ways (by setting the info in the ui5.yaml configuration or via environment variables).

      How does your configuration looks like and what error do you get?

      BR

      • Thanks Florian and apologies.

        I initially created a test non-numeric account and was able to login but of course I got a developer license error so my ui5.yaml configuration is not the issue. I disabled all login methods besides basic auth on /sap/bc/adt yet I still can’t login for some reason with my staff number and get “Error: Error: auth() received invalid user or password”. My struggle at the moment is that I can’t seem to find any trace of the error to help troubleshooting but I have other priorities and will continue trying to solve this later.

        Regards