Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-19918

Option to clean working directory in YAML

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • 6.9.0
    • Bamboo Specs
    • None
    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Problem Definition

      There is no option in YAML Specs to clean the working directory after execution of a build.
      However, it is possible to do this from the Bamboo UI by choosing "Clean working directory after each build" option under Plan configuration -> Miscellaneous tab.

      Suggested Solution

      Add a Specs option to clean the working directory after the build (similar to the option we set in the Bamboo UI)

      Why this is important

      Some builds need clean working directory before each build.

      Workaround

      One will have to start their definition with script task like below to have a clean working directory:

      stages:
        - jobs:
            - scripts:
                - rm -rf ${bamboo.build.working.directory}
                - #your scripts here
      

      However, having this in the script might delete the source code or the artifacts.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jinbasekaran Jeyanthan I (Inactive)
              Votes:
              18 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: