After checking out an application's source code to its repository, you must For each version of the application, you can define the build options, as well as trigger a manual build or deployment (provided you have permission to do so) using the App Factory portal. This section covers the following topics:
Table of Contents maxLevel 3 minLevel 3
Building the application
After, you can build that branch using the following instructions.
By default, the system is configured so that builds and deployments occur as soon as a commit is made to the code repository. You can change this behavior using the auto build and deployment options discussed below.
- Log in to the App Factory portal (for the online version, try https://appfactorypreview.wso2.com).
- Select an application from the list of apps that you own or are invited to participate in.
- Click the Repositories and Builds tab from the left panel.
- The Repositories and Builds page opens.
- Select the branch you want to build and click the Build button associated with it to build the branch. For example,
- If the latest revision of the application version is built without failure, a build success notice appears on the same window along with the build ID. For example,
- Also, click on the application on top of the page. This opens the application's overview page. Look in to the Current Status section's Last Build column to see the result of the latest build.
Checking build status
App Factory's default build server is Jenkins. The Repositories and Builds page has a link at the top of the screen to navigate to the Jenkins server. You can also add Hudson or any other build engine using the instructions in Configuring Continuous Integration Providers.
- Click the Build Server button to access the URL.
- You can log in to the Jenkins server with the same credentials that you use to log in to App Factory.
- From here, you can investigate further details on each of the build triggered for applications. For example,
<More details on how to explore Jenkins server will come up soon>
Deploying the application
- In Repos and Builds page, select the branch with a successful build and click the Deploy button associated with it.
- It deploys the latest built artifacts of your application to the server URLs configured in appfactory.xml file. Also see Configuring Build and Deploy.
If the deployment is successful, a deployment success notice appears on the same window along with the new build ID. For example,
By default, only applications in the Development stage or in the trunk can be built and deployed. The Build and Deploy buttons are not visible for applications in other lifecycle stages. This is to ensure that an application is always demoted to Development before it is edited, built and deployed again. An application must not change in other lifecycle stages.
Auto build and deployment
If you click the icon next to the Deploy button of a branch, a pop-up window opens with options to enable automatic build and deployment to a branch.
Auto Build : Automatically builds an application version after committing its source code. Simply tick the relevant check box to enable auto build to any version/s of an application. App Factory periodically checks the repository for new commits . You can change this default time duration in appfactory.xml file. For information, see Configuring Build and Deploy.