Tasks for deployment environments

Once you have created and configured your new deployment project and deployment environments, you can set up associated tasks for the deployment process. Bamboo allows you to execute a range of different tasks upon deployment including:

  • Bash and other shell commands
  • Bespoke written scripts
  • SCP, SSH, and Artifact handler tasks
  • Ant executables
  • Maven 1.x, 2.x, and 3.x executables
  • Tomcat executables

On this page:

Add an environment task

You can add tasks to a deployment environment either while you create the environment or afterwards. You can modify tasks any time after creating them.

  1. Open your deployment project and expand the relevant environment panel. 
  2. Select Set up tasks (under How you want to deploy).
    The Clean working directory task and Artifact download are included by default:
    Task setup screen in deployment project environment

  3. Select Add task and find the desired task. Only tasks applicable to the deployment environment will be available for selection. 
  4. Configure the task according to the needs of your deployment project. Different tasks will have different requirements.

    Remember that capability and requirement matching is still in effect for deployment environments. If your task does not have the right capabilities it will not be executed, even if the relationship has been defined.

  5. Select Save when you have finished. 
  6. Select Finish deployment project to return to the deployment project page.

Some useful deployment tasks

Deploying with Tomcat

You can use Bamboo to deploy and manage your Java web application with Tomcat 6 or 7, without having to directly interact with Maven, Ant, or write special scripts.

See Using Tomcat with Bamboo for continuous deployment.

Copying and moving files with SCP

You can use the Bamboo SCP task to upload files from Bamboo directly to a remote server as part of a Bamboo job. The SCP task is able to copy multiple files and preserves the directory structure for the copied files.

See Using the SCP task in Bamboo.

Deploying ASP.NET applications with MSDeploy

You can use Bamboo to deploy your ASP.NET web application by using a Script task to run msdeploy.exe.
The MSDeploy command-line syntax is available at: http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx

Assign a final task

Once all of your tasks have been configured, you may assign some or all of them to be Final Tasks. Final Tasks are always executed at the end of the build.

  1. Open your deployment project and expand the relevant environment panel. 
  2. Select Edit tasks (under How you want to deploy).
  3. To make a task final, simply drag the task below the Final tasks bar.
  4. Select Finish deployment project to return to the deployment project page.
Last modified on Aug 10, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.