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

'Force Clean Build' is not honoured

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 4.3.1, 5.9.4
    • Builds

    Description

      Summary (Original content by the reporter)

      When checking out code, the 'Source Code Checkout' task has an option named 'Force Clean Build' to clean out the directory prior to checking out the code. I've discovered that although this option is checked, the code directory is not being consistently cleaned out before fresh code is being checked out.

      Files that have been deleted from the repository are still present in the per-plan directory on each agent that has run the plan, even after several manual runs of the plan have been run on the agents. This causes confusion and delay to the builds as outdated information is used.

      Please ensure that 'Force Clean Build' actually does what the documentation says it does, that is, remove the directory before running the build.

      Steps to Reproduce

      1. Install latest Bamboo v5.9.4 (OS does not matter)
      2. Link to a Git repository
      3. Create a plan with 2 stages:
        1. Stage1: It has a single job with 'Source Code Checkout' task
          • It checks out the source code from the linked Git repository
          • It enables 'Force Clean Build'
          • It shares every file as an artifact (i.e. copy pattern: **/*)
        2. Stage2: It has a single job with 'Script' task
          • It has a artifact dependency to be shared the artifact
          • It executes $ find . to check the working copy of the repository
      4. Execute the plan
      5. Delete a file from the repository
      6. Execute the plan again. The log of Stage2 tells that the deleted file is still accessible

      Expected Results

      The deleted file is not accessible any more

      Actual Results

      The deleted file is still accessible

      Workaround

      Delete the working directory manually before the plan is run (<BAMBOO_HOME>/xml-data/build-dire/<PROJ>-<PLAN>-<JOB> directory). You may do it in another task which is executed prior to 'Source code checkout' task

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              38fcfa868271 Bruce Campbell
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: