How to run groovy scripts as part of deployment

Description

Bamboo 5.x brings deployment to the forefront. If you configure a deployment project, then you will be happy to find all your groovy based tasks available for use in your deployment environment. All the Groovy Tasks for Bamboo tasks have been enable to run as deployment tasks. This includes groovygradlegant, and gint scripts, either inline or as a file.

Steps

This is not much different than for builds.

  1. Add the appropriate tasks just like you would for a standard build.
  2. If you are referencing a script from your source, you will need to add a source repository to the deployment - likely the same one you use for the corresponding build plan.
    1. Go to your build plan configuration
    2. Go to Source repositories
    3. Find the source repository you need in your deployment environment
    4. Select Share repository
    5. Go back to your deployment
    6. Add a Source Code Checkout task and reference the repository you need
       

Test result reporting

Part of a successful deployment should be running integration tests. Whether you use an integration test based on Gint or less formal Groovy script based tests that create JUnit style reports, the deployment result can be based on the result of the test. However, unlike builds, deployment support in Bamboo 5.0 does not report test results in the UI. It is hoped that this will become available on later releases of Bamboo. See BAM-13276.


Find answers from the community.

Ask a question to the community.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.