Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Internally, we have the same problem and the fix was to get plan creation scripts under source control where changes could be controlled and similar plans created from the same source. We maintain multiple Bamboo sites including a production build instance (a restricted instances for releasing products) and a developer build instance. Prior to this ability, the plans diverge. Release 4.3 contains the basics for creating build plans using the most common elements. Now we have hundreds of plans created this way! More capabilities will be added based on feedback, please open an issue with your specific requirements.

There are a number of Bamboo limitations that have been worked around as best as possible. It is hoped these can be improved with future Bamboo support. For instance, plan or job deletes take place in the background and replacement plans or jobs cannot be created until they are fully deleted. Scripting will wait for this to occur, but it can take a minute or so. This means recreate scenarios take longer than one would expect. Adding tasks can be difficult to get working. We have some examples (Examples for AddTask Action), but, some careful work is required to get new ones working correctly :(. Note that on re-create of a plan, Bamboo will discard previous build logs - see and vote for BAM-15957.

...

Section


Column

Features

  1. Support for standard build plan creation, replace, or update scenarios
    • createPlan
    • createPlan --replace - recommended approach that for an existing plan, under the covers, does a move, delete, and create scenario to create the plan in minimum time
    • createPlan --replace --options clear - (since 8.2) modifies plan replacement by, under the covers, removing most plan constructs to enable subsequent scripting to create again from scratch useful when plan is referenced in other plans
    • createOrUpdatePlan - only creates a plan if it does not already exist and only modifies plan name and description
  2. Support for deployment projects and environments
  3. Same plan script can be used for update or create 
    • Enablers to ignore "already exists" errors for add constructs and "not found" errors for remove constructs
    • Enablers to easily remove previous constructs so they can be recreated if needed
    • Makes initial creation and debugging easier
  4. Variable replacements so scripts can be easily duplicated and re-used while minimizing text changes
  5. Scripts can be parameterized using find and replace logic
  6. exportPlan and exportDeploymentProject action can be used to create a CLI script - starting point for creating new plans
  7. Support for
    • Plans - including plan level:
      • Artifacts
      • Repositories
      • Triggers
      • Branches
      • Dependencies
      • Notifications
      • Variables
    • Stages
    • Jobs
    • Tasks - including final tasks
    • Deployment projects
    • Environments
  8. Non-plan actions can also be included in your plan creation script
    • addAgentAssignment or similar

  9. Condition portions of the plan depending on creation script parameters


Column


Image from Bamboo Configuring Plans



...