kemzter
kemzter

Reputation: 11

Need to execute 'git remote prune origin' on where Jenkins gets the Jenkinsfile, but where is it?

My pipeline has the 'Prune stale remote-tracking branches' additional behavior but I guess this is only executed on the workspaces in the agent the pipeline itself will be run on. I'm talking about the initial git call made by Jenkins to get the Jenkinsfile from the repository. Does anybody have an idea where is it?

  1. I tried executing 'git remote prune origin' on the agent's workspace
  2. I tried disabling lightweight checkout so the repository gets cloned in the built-in node, it did not work
  3. I tried adding the 'Wipe out repository and force clone' but it only applies to the workspace

Upvotes: 1

Views: 616

Answers (1)

kemzter
kemzter

Reputation: 11

I figured it out. I deleted the git folders in $JENKINS_HOME/caches/ and it worked.

Upvotes: 0

Related Questions