What are deployment projects?

A deployment project is a container for holding the software project you are deploying: releases that have been built and tested, and the environments to which releases are deployed. Teams typically have QA, staging and production environments. 

Why use deployment projects?

Continuous Integration was not designed for Continuous Delivery. Continuous Integration is designed to keep developers informed about the state of the latest code changes.

In Continuous Integration, historical build results (along with information such as issue and commits) are de-emphasised as more changes are made, since only the latest build is important to the developer.

Using a traditional Continuous Integration server for Continuous Delivery is less than ideal because:

  • Deployed builds are difficult to find – Builds that were deployed only a few days ago are de-emphasised by the system. While this is good for a Continuous Integration workflow, the behaviour makes it difficult for team members to identify which builds have been deployed and when, versus which have not. Teams can work around this with a system that uses labelling but it's not immediately obvious how it should work unless team members are trained to use it correctly.
  • Difficult to find what changes were made between deployments – Build results report commit and issue data between a specific build result and the one immediately before it. There can be many build results between two different deployments. Often the entire history has to be navigated between the two deployments to build a complete view of the changes between them. Sometimes, even other tools have to be used, such as version control systems.
  • Difficult to know what was deployed, and when and where it was deployed – Builds do not have visibility of where code is deployed or what was previously deployed to an environment.
  • Lack of insight into the QA process – Given a list of deployment candidates, builds offer no clear way (other than commenting or labelling) for QA to 'sign off' on a tested release or mark a release as broken or un-releasable.
  • Poor control over who can deploy – While it can be controlled by permissions who can run, view or edit a build, they do not give enough fine grained control over which people in the team can deploy to production or other sensitive environments. In essence, if someone has permission to run the build they can deploy the software any time they wish.

To solve these issues Bamboo provides the following concepts:

  • Deployment project – Represents the software you are deploying (such as a web application), the releases of the software deployed and the environments that they will be deployed to throughout the lifecycle.
  • Environment – Represents the servers or groups of servers where the software release has been deployed to, and the tasks that are needed for the deployment to work smoothly. Example environments could be named Development, QA, Staging or Production. Environments have permissions that allow fine grained control of who can deploy, edit or view an environment and record the full history of releases deployed to it.
  • Release – Identifies a snapshot of artifacts and its associated data such as commits, JIRA issues and the builds that were used to test it. As a release contains the information of the difference between itself and the release beforehand, it's very easy to see the changes between releases or to show the difference between the software deployed on two different environments. Releases also track what environments they have been deployed to.

How do deployment projects work?

Consider the following diagram:

On this page:

What is Continuous Delivery?

Continuous Delivery is the practice where all changes made to a software project are automatically built, tested and made ready for deployment to users. In practice, once the project has been built and tested it is 'staged' somewhere where it can be manually verified and then made available to users.

Unlike Continuous Deployment (the process where code changes are automatically built, tested and deployed without human intervention), typically there is a decision made by a human being to whether or not the software is of sufficient quality or if it is the correct time for the business to make the software available to its users.

Artifacts

Create and test deployable artifacts with build plans. Ensure any artifacts you wish to deploy with Bamboo are flagged as "shared" to make them available to the deployment instructions of the environment.

Releases

Any artifact that has been successfully tested can be used to create a release; you can create as many releases as you like. Bamboo will add other metadata such as related commits and JIRA issues to each release which enable reporting and tracking as it moves through your environments.

Environments

Environments in Bamboo reflect the development, testing and production environments in your IT infrastructure – hostnames and authentication credentials for each environment reside at the task level inside your deployment jobs. At any point in time, you will be able to see which release is running in each environment, which release it replaced, when it was deployed and who deployed it. You will also be able to see any associated JIRA issues.

  • No labels

27 Comments

  1. Graf

    Which variables are available in a deployment task? I'd like to get access to at least the deployment version.

    1. James Dumay

      We are adding those variables soon. You can see what these will be in Variables for deployment environments.

  2. Ray McDermott

    Can we integrate our Nexus Maven repo rather than using these shared artefacts?

    1. James Dumay

      Hi Ray,

      Not just yet but we've had a number of customers ask the same thing!

      You can watch and vote for  BAM-13345 - Getting issue details... STATUS  which covers using artifacts from Nexus. It would be great if you could leave a comment and explain your use case (this helps us make sure all your needs are covered).

      Thanks
      James Dumay
      Product Manager 

  3. William Gomes

    We already use bamboo build plans using Maven to build, release and deploy artifacts to a Maven repository.  We then have separate plans to to deploy to our various environments.  It would be nice to see more maven integration with bamboo, at the minimum BAM-13345 would be a good step in that direction to be able to pull released artifacts from Maven for deploys.

  4. Patrick Wiltrout

    Is there any way to build a release from a plan branch? Currently I can only build releases off of the default branch.

    1. James Dumay

      Not yet, but it is coming soon. See  BAM-13268 - Getting issue details... STATUS

  5. Łukasz Strzępek

    Why in deployment project I can't use MSBuild task?

    1. James Dumay

      There were incompatible changes between the way that build tasks and deployment tasks work. The MSBuild task has not been brought across yet.

      Please watch and vote for  BAM-13515 - Getting issue details... STATUS

  6. Mark Brodziak

    I like the new deployment project feature, but I have a few questions:

    • Is it possible to specify a capability requirement for a deployment project so that the agents can be selected based on capability? As far as I can see it is only possible to selectively dedicate agents.
    • Is it possible to have the deployer specify one or more parameters at deploy time to customise the deployment? For example, our older deployment scripts (implemented using a build pipeline) allow the deployer to specify the JRE version to deploy along with the artifacts.
    • Each environment has its own discrete set of tasks, and they are not shared with other environments in the same deployment; so far, for the deployments that I have configured, these tasks are identical and I control the differences in behaviour by defining and using build variables. Are there any plans to allow users to define tasks at the deployment plan level so that they are shared by all environments, rather than the current mechanism that requires careful copy-and-paste of the configuration into each environment?
    1. James Dumay

      Hi Mark,

      Great questions. Let me try and answer them for you:

      Is it possible to specify a capability requirement for a deployment project so that the agents can be selected based on capability? As far as I can see it is only possible to selectively dedicate agents.

      You might want to vote and watch for this issue that adds requirement support to Environments. We plan to deliver it shortly.

      BAM-13499 - Getting issue details... STATUS

      Is it possible to have the deployer specify one or more parameters at deploy time to customise the deployment? For example, our older deployment scripts (implemented using a build pipeline) allow the deployer to specify the JRE version to deploy along with the artifacts.

      If the JDK is different for each environment, you should be able to set a variable for the JDK against the Environment. However, I can see a use case for parameterised deployments, so I have raised the following issue for you. If you can, please describe in detail on the issue your use case.

      BAM-13707 - Getting issue details... STATUS

      Each environment has its own discrete set of tasks, and they are not shared with other environments in the same deployment; so far, for the deployments that I have configured, these tasks are identical and I control the differences in behaviour by defining and using build variables. Are there any plans to allow users to define tasks at the deployment plan level so that they are shared by all environments, rather than the current mechanism that requires careful copy-and-paste of the configuration into each environment?

      While I believe build and deployment blueprints/templates are ultimately what we should develop, in the short term we are adding the ability to Copy tasks from other Environments. Vote and watch for the issue below.

      BAM-13269 - Getting issue details... STATUS

      You mentioned you wish to "share" environments between projects - is this for configuration, reporting or both? I'd love to hear more about your thoughts here.

      Thanks
      James Dumay
      Product Manager 

      1. user-055e6

        I also have interest in sharing environments. We have multiple projects and builds. Each build is then setup with its own deployment. Then each deployment has a dev, qa, and prod. But the 3 environments are all the same even though they are each defined separately in each of the deployments. It would be nice to share or link the environments so that I can click on an environment, say dev, and see all the projects deployed to that environment. Does that make sense?

        1. James Dumay

          Thanks Patrick. You might be interested in voting for the following issue:

          BAM-13575 - Getting issue details... STATUS  

  7. Anonymous

    Hi all, I'm wondering if it is a bug that I can't use a source repository in any deployment task. To be more specific I can add the task, but I'm not able to select any source repository because the combo box is empty.

    1. Tomi

      Looks like you have to go into Bamboo Admin/Shared Repositories and define the repo there before they are available to deployment projects (unlike build projects where you can define the repo indepedently).

  8. We would like to use deployment plans for plans which don't produce any artifacts.

    Our specific example is Puppet Manifests which we run a series of tests against before executing a Capistrano task to deploy to the Puppet master. In our deployment plan we just need to check out the source repository but like Anonymous above this doesn't seem to be possible.

  9. user-d5d75

    In the current implementation it seems that parallel execution of the deployment tasks on mutiple agents is not possible. Selecting multiple agents as being dedicated to an environment will result in a round-robin single agent selection upon deployment.

    We have multiple nodes in our production environment and would like to be able to have a "Production" environment definition which runs parallel deployments to multiple nodes. The task execution is identical for each node (even variables).

    I can imagine something similar to the concept of stages in build jobs. For us this concept is also very suitable for the deployment projects.

    1. Jordan Packer

      We have the exact same problem. We'd like to move all of our deployments into Deployment Projects, but that requires us to run everything one step at a time. For environments that require a deployment to multiple nodes, running in parallel decreases the deploy time by 80%. I don't know if we'll be able to use Deployment Projects until this is fixed.

      1. James Dumay

        I've created an improvement for multiple node support however, we do not have plans to work on this today. Our recommended way of deploying to multiple nodes is to use an orchestration tool, such as Fab or Capistrano, to take care deployment to multiple nodes from the agent and have Bamboo kick off this process from a Script task defined on the environment.

          BAM-14194 - Getting issue details... STATUS

  10. Michael Dalzell

    Is it possible to deploy into an AWS environment contained in a VPN using this method?

  11. Anonymous

    Is there a way to organize the deployment dashboard on a Project basis similar to Builds?

  12. NathanA

    Hi, at the moment there is no way to filter deployment projects in the same way as builds are. If this is imprtant to you, please raise an issue and vote for it.

    Thanks

  13. David Zahorsky

    Well i really like the deployment plans.

    We already integrated it with lot of success. But now comes the next step. Is it possible to run Tests on these Environments? Yeah i know i could launch a script which is testing these environments, but i would like to have the same Integration as it is on the build plans.

    The problem is, that we can run tests "just" in the build plan. But now we want to add Selenium Tests on the different Environments.

    Any plans on that? Or is my approach of thinking wrong? (smile)

     

    1. James Dumay

      You can run tests from within environments today, however, you will not have any test reporting. Test reporting is something we are thinking about, so be sure to watch and vote for the issue below:

      BAM-13276 - Getting issue details... STATUS

  14. Anonymous

    First paragraph, you probably meant "QA, staging and productION environments"?

  15. Anonymous

    It's a shame deployments are sequestered off into a different part of the program.  It would flow very nicely if deployments could be a "Stage" of a larger plan.   Like:  1) Checkout 2) Test 3) Deploy to test 4) Automated testing 5) Deploy to UAT

    As it stands in order to use Deployment Projects, you can't get the above flow.  You can accomplish the above if stages 3 + 5 are just normal stages but you lose the context of tracking deployables.

    1. James Dumay

      This improvement which should satisfy your pipelining requirement

      BAM-13347 - Getting issue details... STATUS