Skip to content

Commit 9b1f0f1

Browse files
MarkEWaiteatombrella
authored andcommitted
Remove obsolete git checkout args
Git plugin 4.6.0 removes the outdated default arguments. Their default values were used in the tests previously. No reason to show the default values to users in tests or in example scripts.
1 parent ed9f10d commit 9b1f0f1

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

docs/scripted-pipelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This is an example of a pipeline script with a single pipeline job that does Pre
2121

2222
``` groovy
2323
node {
24-
checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], doGenerateSubmoduleConfigurations: false, extensions: [pretestedIntegration(pretestedIntegration: squash(), integrationBranch: 'master', repoName: 'origin')], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'GitHub', url: 'https://github.com/Praqma/phlow-test.git']]])
24+
checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], extensions: [pretestedIntegration(pretestedIntegration: squash(), integrationBranch: 'master', repoName: 'origin')], userRemoteConfigs: [[credentialsId: 'GitHub', url: 'https://github.com/Praqma/phlow-test.git']]])
2525
sh 'mvn install'
2626
pretestedIntegrationPublisher()
2727
}

src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/AccumulatedCommitStrategyIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public void happyDayPipelineDeclarativeACCUMULATED() throws Exception {
257257
" stages {\n" +
258258
" stage(\"checkout\") {\n" +
259259
" steps {\n" +
260-
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], doGenerateSubmoduleConfigurations: false, extensions: [pretestedIntegration(gitIntegrationStrategy: accumulated(), integrationBranch: 'master', repoName: 'origin')], submoduleCfg: [], userRemoteConfigs: [[url: '%URL']]])\n" +
260+
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], extensions: [pretestedIntegration(gitIntegrationStrategy: accumulated(), integrationBranch: 'master', repoName: 'origin')], userRemoteConfigs: [[url: '%URL']]])\n" +
261261
" }\n" +
262262
" }\n" +
263263
" stage(\"publish\") {\n" +

src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/GHI98_SupportForCredentialsIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class GHI98_SupportForCredentialsIT {
4343
final String uName = System.getProperty("usernameForTest");
4444
final String repo = System.getProperty("repoForTest");
4545
final String pipelineScript = "node {\n" +
46-
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], doGenerateSubmoduleConfigurations: false, extensions: [pretestedIntegration(gitIntegrationStrategy: squash(), integrationBranch: 'master', repoName: 'origin')], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'pipCredentials', url: '%repoForTest']]])\n" +
46+
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], extensions: [pretestedIntegration(gitIntegrationStrategy: squash(), integrationBranch: 'master', repoName: 'origin')], userRemoteConfigs: [[credentialsId: 'pipCredentials', url: '%repoForTest']]])\n" +
4747
" pretestedIntegrationPublisher()\n" +
4848
" echo \"Ohoy we've got success!\"\n" +
4949
"}";
@@ -89,4 +89,4 @@ private void cloneTestRepositoryAndPrepareABranch() throws Exception {
8989
g.push().setPushAll().setCredentialsProvider(new UsernamePasswordCredentialsProvider(uName, pw)).call();
9090
}
9191

92-
}
92+
}

src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/PipAsGitExtensionIT.java

-2
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ public void pipelineScriptTest() throws Exception {
106106
"node {",
107107
"checkout([$class: 'GitSCM'," +
108108
" branches: [[name: '*/ready/**']]," +
109-
" doGenerateSubmoduleConfigurations: false," +
110109
" extensions: [pretestedIntegration(gitIntegrationStrategy: squash(), integrationBranch: 'master', repoName: 'origin')]," +
111-
" submoduleCfg: []," +
112110
" userRemoteConfigs: [[url: '" + "file://" + repo.getDirectory().getAbsolutePath() + "']]])",
113111
"pretestedIntegrationPublisher()",
114112
"}"), "\n"), false);

src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/SquashCommitStrategyIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void happyDayPipelineDeclarativeSQUASH() throws Exception {
6060
" stages {\n" +
6161
" stage(\"checkout\") {\n" +
6262
" steps {\n" +
63-
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], doGenerateSubmoduleConfigurations: false, extensions: [pretestedIntegration(gitIntegrationStrategy: squash(), integrationBranch: 'master', repoName: 'origin')], submoduleCfg: [], userRemoteConfigs: [[url: '%URL']]])\n" +
63+
" checkout([$class: 'GitSCM', branches: [[name: '*/ready/**']], extensions: [pretestedIntegration(gitIntegrationStrategy: squash(), integrationBranch: 'master', repoName: 'origin')], userRemoteConfigs: [[url: '%URL']]])\n" +
6464
" }\n" +
6565
" }\n" +
6666
" stage(\"publish\") {\n" +

0 commit comments

Comments
 (0)