This documentation is for WSO2 App Factory 2.0.0. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata


The previous section, explained about configuring the Lifecycle for an application with various stages. This section focuses on how to add a new "Stage" to your system. Generally stages that are associated in an application creation - release lifecycle are "Development", "Testing" and "Production". However depending on the organization or business type, the stages can differ. Similarly the resource allocations, permissions and other configurations may change as well. 

You can define the stage details of your preference, inside the <DeploymentStage name=""> element in <AF_HOME>/repository/conf/appfactory/appfactory.xml file. 

Sample configuration

Following sample code explains how to add the Testing stage as a deployment stage:

<DeploymentStage name="Testing">
		<ApplicationType name="*">
				<Property name="Class">org.wso2.carbon.appfactory.tenant.roles.S2Integration.GITBlitBasedGITRepositoryProvider</Property>
				<Property name="BaseURL"></Property>
				<Property name="URLPattern">{@application_key}/{@stage}/as</Property>
				<Property name="AdminUserName">admin</Property>
				<Property name="AdminPassword">admin</Property>
				<Property name="minInstances">1</Property>
				<Property name="maxInstances">1</Property>
				<Property name="shouldActivate"></Property>
				<Property name="alias">astest</Property> 
				<Property name="cartridgeType">astest</Property> 
				<Property name="repoURL"></Property>
				<Property name="dataCartridgeType"></Property>
				<Property name="dataCartridgeAlias"></Property>
	<AutomaticDeployment enabled="false">

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

Element NameDescriptionTypeDefault ValueFixed ValuesMandatory/Optional

<DeploymentStage name="">

Specifies new life cycle stage that is defined in life cycle config file (configurations.xml).



Defines application types and its repository configuration. Deployer can be either S2 or Carbon4. Carbon4-based deployer only contains <ClassName> tag inside <Deployer>. S2 contains all other tags.



<ApplicationType name="">

Specify allowed application type, which can be deployed.




Class path to application type deployment's implementation class.




Staging deployment endpoint URL.




Credentials of repository provider.



Property related to cartridge needed to subscribe.



Enable or disable Deploy button.


<AutomaticDeployment enabled="">

Enable or Disable auto-deployment.

Boolean true, false 



Polling period (in minutes) to the repository, to check for the new commits. Default this has been configured only for the "Development" Stage, which is the most common case. 


<AutomaticDeployment enabled="">

Define whether to deploy "Latest" or "Marked" artifact.

Boolean true, false 
 <ArtifactStoragePolicy> String   

<Promote> and <Demote>


Transition event which is specified in App Factory life cycle configuration file.



Tagged/ Promoted artifact will be deployed to the promoted stage.




Define target stage when transition state is invoked.

<CreateArtifact> String   


Specify end point service URL to call when deploy button is clicked.



Deployment server URL to deploy artifact.

<MountPoint>Registry mount point for other service (eg: appserver) for property management in appfactory.String   


Base access URL for application launch.



Configure the Lifecycles such that the applications in that lifecycle can/cannot be build.

Boolean true, false 


Base service URL for storage.



RSS name of given deployment stage.String   
  • No labels