Introduction
Most application development environments have Continuous Integration (CI) tools to facilitate periodically integrating and merging all developer workspaces with a shared mainline in order to avoid integration issues. WSO2 App Factory comes by default with several CI tools such as Jenkins, and we work on facilitating most of the commonly-used types with every new version. In the meantime, if you cannot find the tool of your choice, you can add it using the <ContinuousIntegrationProvider name="" enabled="">
element in <AF_HOME>/repository/conf/appfactory/appfactory.xml
file.
Sample configuration
Following sample code shows how to add a new CI tool to App Factory:
<ContinuousIntegrationProvider name="jenkins" enabled="true"> <Property name="BaseURL">https://jenkins.appfactorypreview.wso2.com</Property> <Property name="Authenticate">true</Property> <Property name="Maven3ConfigName">m3</Property> <Property name="DefaultGlobalRoles">readonly</Property> <Property name="ProjectRolePermissions">hudson.model.Item.Configure,hudson.model.Item.Build,hudson.model.Item.Workspace,hudson.model.Item.Read</Property> <Property name="ListenerPriority">50</Property> <Property name="ResourceUserId">admin@admin.com</Property> <Property name="API-Token">xxxxxxxx</Property> </ContinuousIntegrationProvider>
The elements of the sample configuration are explained below. You can use this information to edit the file according to your requirements.
XML elements of the sample code
Property Name | Description | Type | Default Value | Fixed Values | Mandatory/Optional | |
---|---|---|---|---|---|---|
<ContinuousIntegrationProvider name="" enabled=""> | name | CI provider name. | String | |||
enabled | Enable or disable mentioned CI. | String | true, false | |||
<Property name="BaseURL"> | Base URL of Jenkins service. | String | ||||
<Property name="Authenticate"> | Enable authentication by default. | String | true, false | |||
| Maven home configuration ID. | String | ||||
| Jenkins's default role. | String | ||||
| Jenkins's permission configuration for a given project. | String | ||||
| Listener priority level for app factory application event. | Integer | ||||
<Property name="ResourceUserId"> | user ID. | String | ||||
<Property name="API-Token"> | API Token key of Jenkins. Token should be set according to the running instance of Jenkins. | String |
For information on building and deploying your applications and managing repository, see Checking in and Branching the Code.