artgrohe
artgrohe

Reputation: 3382

Bamboo build error: How to properly clean bamboo caches?

The problem:

Bamboo executes old unit tests that don't exist my current develop branch which causes a build error.

The situation that causes this problem:

After a big refactoring process of my maven java project, where I basically moved, modified and renamed every file, I committed my changes to my remote repository.

That triggered my bamboo build plan, to start the build process.

The git code checkout seems to work, but the next step, running the unit tests, fails! Looking in the log file I see that an old, no more existing java Unit test class gets executed and of course fails because of NullPointerExceptions.

Things I tried to fix this problem

A. Remove caches in the Administration section

  1. I went to Bamboo->Administration->Repository Settings and selected the cache of my project and deleted it.
  2. I started the build plan again
  3. BUILD ERROR ! Same problem

B. Delete the cache directory in the file system

  1. Start a RDP session on the bamboo server

  2. stop bamboo

  3. go to D:\bamboo-home_64\xml-data\build-dir_git-repositories-cache

  4. delete all files in this folder

  5. start bamboo

  6. start the build plan again

  7. BUILD ERROR! same problem

Meta info

bamboo version: 6.1.0 build 60103 - 18 Jul 17

I don't know what I can do to fix this..

Upvotes: 4

Views: 11370

Answers (1)

Oleksiy Chystoprudov
Oleksiy Chystoprudov

Reputation: 1145

There's Clean working directory task. Add it as first task to your Job and see if it solves the issue.

Upvotes: 6

Related Questions