Git checkout failure should keep the build shared artifacts

XMLWordPrintable

    • Severity 2 - Major
    • 0

      If a git checkout task fails, it will clean the directory and retry in a different way.

      simple	02-Dec-2013 04:40:20	Starting task 'Checkout Confluence' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
      simple	02-Dec-2013 04:40:20	Updating source code to revision: ea660f5884491b461735c91a59cd6b64aae103eb
      simple	02-Dec-2013 04:40:20	Creating local git repository in '/opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01/.git'.
      simple	02-Dec-2013 04:40:20	Initialized empty Git repository in /opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01/.git/
      simple	02-Dec-2013 04:40:20	Fetching 'refs/heads/master' from 'https://address.to.my/repo.git'. Will try to do a shallow fetch.
      simple	02-Dec-2013 04:40:36	From https://address.to.my/repo.git
      simple	02-Dec-2013 04:40:36	 * [new branch]      master     -> master
      simple	02-Dec-2013 04:40:36	Checking out revision ea660f5884491b461735c91a59cd6b64aae103eb.
      simple	02-Dec-2013 04:40:36	fatal: reference is not a tree: ea660f5884491b461735c91a59cd6b64aae103eb
      error	02-Dec-2013 04:40:36	Checkout to revision ea660f5884491b461735c91a59cd6b64aae103eb has failed.
      simple	02-Dec-2013 04:40:36	Warning: failed to checkout source code to directory '/opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01', trying to recover...
      simple	02-Dec-2013 04:40:36	Cleaned source directory '/opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01'...
      simple	02-Dec-2013 04:40:36	Creating local git repository in '/opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01/.git'.
      simple	02-Dec-2013 04:40:36	Initialized empty Git repository in /opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01/.git/
      simple	02-Dec-2013 04:40:37	Fetching 'refs/heads/master' from 'https://address.to.my/repo.git'
      

      See the "Warning: failed to checkout source code to directory '/opt/bamboo-agent/xml-data/build-dir/COD-CODAT-ALCCLIENT01', trying to recover..." message.

      The problem is: if you downloaded an artifact to the same directory, you will silently lose your artifact. It's fairly easy to make that mistake if you place the artifact and the source at the root level (the default values).

      It was a shared repository, shallow clones enabled.

            Assignee:
            Unassigned
            Reporter:
            Cintia Calvo (Inactive)
            Votes:
            9 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: