Handling application configuration cloning for new application version deployment in MobileFirst Foundation 8.0

Using the IBM MobileFirst Operations Console you can clone an application configuration into a new application version, so you can register an identical copy of the application, but with a different version (same application id, environment, descriptor, and configuration). But what if you want to achieve the same via command-line?

If you are an on-premise 8.0 customer or Mobile Foundation service customer, then read further to learn how to clone an application configuration into a new application using cli.

The MobileFirst CLI does not currently have an application cloning functionality and if you want to automate all the deployment processes, for example using Jenkins, you have to implement your own cloning process.

For this purpose I’ve written a Nodejs-based program that takes care of the process of cloning an application’s configuration.
The program:

  • Pulls the Application-Descriptor JSON File from the server
  • Unzips the artifacts zip file
  • Adds new version to the Application-Descriptor JSON File (applicationKey.version)
  • Zips a new artifacts zip file
  • Modifies the version in the configuracion file (config.xml)
  • Registers an application
  • Pushes the updated application configuration

Example

$ node cloneApp.js local mfp jif.example.hellocordova android 1.0.1 1.1.1

Check it out

Head over to my GitHub repository page and let me know if you have any questions!

Jorge Iglesias is a Hybrid Cloud services consultant at IBM.

Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on May 07, 2018