Even though I am using the same repo on every build, this message shows up:
Repository setting changed, deleting working directory
Why is this happening even though the repo hasn't changed?
Even though I am using the same repo on every build, this message shows up:
Repository setting changed, deleting working directory
Why is this happening even though the repo hasn't changed?
No. I can run a build and then turn around and run it immediately and get this in the log:
12:30:22,962 DEBUG - Loading scm rc file ...
12:30:22,963 INFO - Repository setting changed, deleting working directory [/home/qbadmin/agent/prod/workspace/392]
12:30:22,965 DEBUG - Creating git repository to directory [/home/qbadmin/agent/prod/workspace/392] ...
I need to have the master workspace cleaned up of everything but what is necessary to prevent a re-clone of the git repo for getting git changes. I tried setting the configuration master pre-execute setting to "Delete specified files on current node" to ",-.qbcache/,-.git/**" but it's only deleting files and leaving behind empty directories. I also tried setting it to "Delete specified directory on current node" to "*,-.qbcache,-.git" but it doesn't accept file matching pattern. How can I get the result I want?
Please try below groovy script:
groovy:
for (file in configuration.workspaceDir.listFiles()) {
if (file.name != ".qbcache" && file.name != ".git") {
if (file.isFile())
com.pmease.quickbuild.util.FileUtils.deleteFile(file);
else
com.pmease.quickbuild.util.FileUtils.deleteDir(file);
}
}