Option to clean working directory in YAML

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 6.9.0
    • Component/s: Bamboo Specs
    • None
    • 1

      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.

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

              Created:
              Updated:
              Resolved: