Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Building Mobile Application Projects Using Jenkins | Advanced Settings | Creating New Build Jobs | Building Mobile Applications From Source Control
 
Building Mobile Applications From Source Control
You may want to build your application directly from source control, without user intervention, for example, as a common "nightly" build for testing, or when making a clean deployment to the App Store. In these cases, a build job can be created manually to suit your needs.
Note:
As requirements and infrastructure can vary greatly between organisations, this section is not a direct step-by-step set of instructions of what must be done to get your application built. It provides as many common details and useful hints as possible so that you can work with your existing infrastructure to get a result that works well for you.
First, check out your source into a folder into the workspace, setting things up so that the project is held directly in a folder named after the project. (e.g., for a project called "MyMobileProject", you want to have Jenkins_workspace_root/MyMobileProject with build.xml, src/, model/, etc. inside.). This step will vary a lot depending on your source-control system, how you connect to it, and which Jenkins plugin(s) you are using.
Tip:
If your source control system sets files to read-only unless they are marked as open for edit (e.g., Perforce), then you may need to unlock some files for edit and revert them after the build process. To minimise this, it is recommended that the gen, _temp_, .launch and Builds folders, along with the .classpath file are kept out of source control, as these folders will often change during the build and/or activate processes. As long as this rule is adhered to, read-only files should not be a problem with most mobile projects.
After the project source is checked out, in most cases you will want to generate the mobile sources, using the model to create the gen folder and all resources, source, etc. inside. This is done using the Generate Mobile Designer Sources build step. Enter the project's name (e.g., "MyMobileProject") and optionally specify the location of your Software AG install on the worker node computer that you want to build with. If no value is given, Jenkins will try the default location.
After source code is generated, the next build step is Build Mobile Designer Project. This step allows you to specify the handset target, version, language, and so on. This step may be repeated as many times as required to create the builds that are needed.
Tip:
Creating more than one build in the same build job can be convenient. However, be aware that if one build fails, the Jenkins job will stop at that point. It can often be better to start by creating one Jenkins job, then copy it and make small changes to get other builds.
When all builds are finished, it is important to archive the built files in a post-build action. In most cases, you will have to capture the contents of the your_project/Builds folder.