Fergal Dearle
Fergal Dearle

Reputation: 11

Setting default behaviour for Steps SCM Plugin

We have just upgraded to Jenkins 2.89.3 and Blue Ocean 1.4.0. Some new behaviour by the Steps SCM plugin or the Git Plugin are causing us difficulty.

Steps SCM injects a Checkout SCM step into each step in our pipelines so that the Git repo is always checked out when the Step starts.

As part of the update the default Checkout SCM has now added an aggressive git clean using:

$git clean -fdx

The docs seem to suggest that there is a 'clean' option that can be set to false for scm when you are calling 'checkout scm' directly in your Step.

I have not found a way to configure this option for the default Checkout SCM that is injected into the step.

Any suggestions at to how this option can be configured?

Upvotes: 0

Views: 395

Answers (1)

dot
dot

Reputation: 627

I understand that you are trying to get rid of clean before checkout and clean after checkout options.

  1. Navigate to http://server:port/blue/pipelines
  2. Click on the Job
  3. Hit the gear icon next to the job name
  4. It takes you to http://server:port/job/job-name/configure (Classic View)
  5. Navigate to "Branch Sources"
  6. Under Git behaviors, you will see the Clean before checkout and Clean after checkout Options. Click on the 'X' button to remove them.

Upvotes: 1

Related Questions