Bitbucket repository created and populated with a Java Maven Web Application. JDK 1. Tomcat 7. Configuring Application links with Bitbucket server As we would be using the source code stored in the Bitbucket repository, we will need to provide and configure the Bitbucket server link in the Bamboo server. This will automatically create a reciprocal link in the Bitbucket server as well. Bitbucket Server view of application link is created in the Administration settings.
|Published (Last):||28 December 2016|
|PDF File Size:||20.45 Mb|
|ePub File Size:||12.45 Mb|
|Price:||Free* [*Free Regsitration Required]|
Bitbucket repository created and populated with a Java Maven Web Application. JDK 1. Tomcat 7. Configuring Application links with Bitbucket server As we would be using the source code stored in the Bitbucket repository, we will need to provide and configure the Bitbucket server link in the Bamboo server.
This will automatically create a reciprocal link in the Bitbucket server as well. Bitbucket Server view of application link is created in the Administration settings. Once the application links are configured, the Bitbucket repositories will be available to be selected in the Bamboo project configuration. Project: Typically every project teams work on software delivery of multiple applications. The project created in Bamboo is for every application which the team works on.
Enter a name and description. Click on Save. Plan: As the project is created, the next step is to create a Plan. A Plan contains information about the version control repository. In this case, our Java Maven web project is stored in the Bitbucket. Few other details like Access control for the plan are also mentioned as a part of creating the Plan. Click on Create Plan and enter the details as shown below.
The Bitbucket repository to be linked to the plan is also available once both the tools are linked. Once the above details are entered, click on Configure plan. Click on Create for now. We will now proceed to create Stages and Tasks. The following Plan configuration screen that contains a Default Stage in which we will create the Job followed by the grouping of tasks within it comes up.
Stage: All the plans created will initially contain a Default stage as shown in the above screen. Example: of a stage can be a Build stage or a Deploy stage. Each stage will contain its own job with the grouping of tasks which is the smallest level of work done for build or deploy. The stages run sequentially and every stage must execute successfully before moving on to the next stage.
Jobs: Jobs contain one or more tasks which are run in parallel. Tasks: Tasks are a part of a job. Example: Jobs could be a maven build or deploy to the Tomcat app server. All of the above definitions can be put in the following diagram for execution within a plan and can be used as shown below.
Modify the Stage name and click on Save. I would be creating only one stage for my Build and Deploy. Teams are free to create multiple stages to segregate the same. Before we create the jobs and tasks, we need to install a remote agent for build and deployment which is described in the next section.
In Bamboo, there are two types of Agent: Local Agents run on the Bamboo server which in my view should not be used to a large extent due to load and performance issues of the Bamboo server. Remote Agents run on the machines other than the Bamboo server. Capabilities are then tagged to the Agents to run specific Jobs defined in the plan.
Install a remote agent i From the Administration menu, select Overview and download the agent on the remote machine. In case a new directory needs to be specified then the option —Dbamboo. The command will be run as follows to install and enable the agent. The agent is now installed and we need to approve the agent. Go to the URL mentioned at the end of the window and approve the agent to be enabled.
The URL to be used is as follows as per the instructions in the above screen. The remote agent is now in an approved state and we can proceed to add capabilities such as build instructions to run Maven build etc. The remote agent is now online and is shown in the TAB. Click on the agent to add a Maven capability which will be used later in the Plan. Click on Add capability. As we will be performing a Maven build add as shown.
Click on Add. The capability is now added to the remote Agent. Click Save. Add the Maven build details like Goal and Working sub-directory as shown. Click on Save once done. For this Job go to the Artifacts TAB and create an artifact definition to make the WAR file generated out of the Maven build to be available in the Deploy stage which will be created next. Click Create once done.
In the Deploy Stage, add a job to deploy the war file to Tomcat. Click on Add job and select Create a new job. Click on Create job. Click on this job to add a task. The default task Source Code Checkout can be deleted. Add the Deploy Tomcat task and configure the task. Click on Create dependency. Click on Create. The dependency is added to this job so that the WAR file will be successfully deployed. Run Plan So here comes the moment. As the plan is completely defined to perform Build and Deploy tasks, we can now Run the plan.
The plan run is successful and the WAR file is deployed successfully to the Tomcat app server. Triggers and Permissions Additionally, for the plan, we can add triggers for an automatic run of the plan without any manual intervention. Triggers include the following options. The tool can be further configured to integrate with Sonarqube for code analysis, Artifactory to store version of the binaries, Ansible, etc.
Most importantly its seamless integration with Bitbucket is definitely simple and easier too. Hope you enjoyed this informative tutorial on Atlassian Bamboo!! Recommended Reading.
Atlassian Bamboo Tutorial: Java Web App Deployment with Bitbucket Repository
Ask the community This tutorial outlines how to use Bamboo to run, and get rapid feedback on, builds for your Java project. Related pages: Getting started with. NET and Bamboo Information you need before you begin This tutorial assumes you are using Bamboo Cloud, which allows us to make some assumptions about the resources available to Bamboo. You just need to make sure you or your company administrator have properly installed and configured Bamboo for running plans. We also assume you have an individual Bitbucket account. Create a project and plan A Bamboo plan specifies the source code repository, the tasks to run in your build, and when to trigger a build.
Atlassian Bamboo Training
Atlassian Bamboo Tutorials