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

Recovering from git repository checkout error breaks Docker Runner volume

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.2.8
    • None

    Description

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. create a BbS repository in Bamboo
        1. enable the “Use shallow clones” option
        2. disable the “Enable repository caching on agents” option
      2. create a plan that uses the above repo, and has the following tasks:
        1. script task with single “sleep 10” command
        2. source code checkout task, with the “Force Clean Build” enabled and empty “Checkout Directory”
        3. another script task that will use some files from the repo
      3. enable Docker Runner for the plan and use alpine/ubuntu image; leave the default volume mappings
      4. dedicate a remote agent to the plan
      5. trigger the plan using the following script
      echo A >> abc/a.txt && curl -X POST -u <ADMIN>:<PASSWORD> <BAMBOO_URL>/rest/api/latest/queue/PROJ-PLAN && git add . && git commit -m "first" && git push 

      (this will create a new commit after the plan is triggered, but before the source code is checked out on the agent)

      Expected Results

      The plan is executed successfully 

      Actual Results

      The plan fails because the build working directory is empty after the source code checkout task.

      Because of the new commit shallow clone fails at first, and an attempt to recover from it breaks the build working directory volume. The source code checkout actually succeeds, and the repository is ok on the agent filesystem, it’s just broken in the docker runner container.

      Workaround

      Configure a custom “Checkout Directory” in the source code checkout task

      Attachments

        1. agent.log
          23 kB
        2. build.log
          13 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmajkutewicz Jan Majkutewicz (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: