Skip to end of metadata
Go to start of metadata

Introduction

Continuous Integration (CI) tools facilitate periodic integration and merging of all developer workspaces with a shared mainline. It avoids code integration issues in development environments. 

WSO2 App Factory comes by default with Jenkins server as the CI tool. You can integrate a tool of your choice 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 NameDescriptionTypeDefault ValueFixed ValuesMandatory/Optional
<ContinuousIntegrationProvider name="" enabled="">nameCI provider name.String   
 enabledEnable 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 

<Property name="Maven3ConfigName">

Maven home configuration ID.String   

<Property name="DefaultGlobalRoles">

Jenkins's default role.String   

<Property name="ProjectRolePermissions">

Jenkins's permission configuration for a given project.String   

<Property name="ListenerPriority">

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.

  • No labels