Performing a Cloud Build

Use packager commands to download the specified application assets and reuse libraries from the SAP Fiori front-end server to a local target directory, create a project ZIP on the SAP Cloud Platform mobile service for SAP Fiori cloud build service and upload the Web assets, plugins, and other application metadata. Then start the cloud build service to package the application assets with the Cordova plugins and generate signed or unsigned application binary files for iOS (.ipa) and Android (.apk).

Context

Before building your application on the SAP Cloud Platform mobile service for SAP Fiori cloud build service, make sure your environment has been properly configured:

The typical command sequence for packaging is:

  1. downloadfromfes – downloads the application assets and related components from the SAP Fiori front-end server. For more information, see Downloading from the SAP Fiori Front-End Server
  2. createpackage – creates the package
  3. uploadpackage – uploads the package to the SAP Cloud Platform mobile service for SAP Fiori cloud build service
  4. startbuild – initiates the build on the SAP Cloud Platform mobile service for SAP Fiori cloud build service
Additional commands include:
  • status – checks the build status
  • doall – automatically runs the SAP Cloud Platform mobile service for SAP Fiori cloud build process. It completes the following commands downloadfromfes,createpackage, uploadpackage, startbuild.
  • signingids – enables the SAP Cloud Platform mobile service for SAP Fiori cloud build service to sign the apps
  • downloadapp – downloads the application binary to a local directory
  • info – collects basic information on the SAP Cloud Platform mobile service for SAP Fiori cloud build service package.

The packager uses the following syntax:

node <path to SDK directory>/apps/packager/bin/packager [options] [commands] ...

To display the full list of options and defaults, use:

node <path to SDK directory>/apps/packager/bin/packager --help

Procedure

  1. downloadfromfes

    This command downloads application assets and related components from the SAP Fiori front-end server. For more information, see Downloading from the SAP Fiori Front-End Server

  2. createpackage
    This command creates a package on the SAP Cloud Platform mobile service for SAP Fiori mobile services server. The packager prompts you to enter your SAP Mobile Secure username and API password.
    • Required options

      --targetDir <path to local target directory>

      --config <path to appConfig.js>

      --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal>

      --cloudProxy <host:port of proxy server> (if applicable)

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> createpackage

  3. uploadpackage

    This command uploads the assets that have been downloaded from the SAP Fiori front-end server to the SAP Cloud Platform mobile service for SAP Fiori cloud build service, including the splash screen definitions and icons that represent the application on the device home screen.

    The required options are the same as for createpackage.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> uploadpackage

  4. startbuild

    This command initiates the build on the SAP Cloud Platform mobile service for SAP Fiori cloud build service.

    When you build your application, the CLI packager imports the default packager plugins. For a complete list of these plugins, see Default Project Plugins.

    When using the Cordova CLI packager to create a Custom SAP Fiori Client, it will install a default SAPUI5 theme for your application by automatically installing it into your application's resource folder. This feature will not overwrite or replace a version of SAPUI5 that has already been added to a Custom SAP Fiori Client project. For more information, see Automatically install a default SAPUI5 theme.

    The required options are the same as for createpackage.

    The packager prompts you to enter your SAP Mobile Secure username and API password. When the build is completed, a message is sent to the email account that is associated with the credentials provided for the build.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> startbuild

  5. status

    Use this command during a build to check the build status.

    The required options are the same as for createpackage.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> status

  6. doall
    Use this command to complete the build process following the process mentioned above.
    1. downloadfromfes
    2. createpackage
    3. uploadpackage
    4. startbuild

    Once initiated, you can use the status command to check the status of your build. The packager prompts you to enter your SAP Mobile Secure username and API password. When the build is finished, a message is sent to the email account that is associated with the credentials provided for the build.

    The required options are the same as for createpackage.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> doall

  7. signingids

    This command returns a list of available signing profiles and their IDs from SAP Cloud Platform mobile service for SAP Fiori. If you want theSAP Cloud Platform mobile service for SAP Fiori cloud build service to sign your apps, use this information to set the appropriate signing IDs before running the build step.

    Find the appropriate iOS and Android profile IDs in the list and add them to appConfig.js (androidSigningID and iOSSigningID). When you execute startbuild, these signing IDs are used to sign the apps.

    The required options are the same as for createpackage.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> signingids --verbose

  8. downloadapp

    Use this command to download the application binary to a local directory, if necessary.

    The required options are the same as for createpackage.

    The output is placed in a build folder under the target directory where the content from the SAP Fiori front-end server has been placed.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> downloadapp

  9. info

    Use this command to review basic information about the SAP Cloud Platform mobile service for SAP Fiori cloud build service package.

    The required options are the same as for createpackage.

    The output is placed in a build folder under the target directory where the content from the SAP Fiori front-end server has been placed.

    • Example

      node ~/SAP/SDK/apps/packager/bin/packager --targetDir <path to local target directory> --config --config <path to appConfig.js> --cloudHost <Path to SAP Cloud Platform mobile service for SAP Fiori Host portal> info