Skip to content

Commit

Permalink
Drop support for git:// URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Mar 6, 2023
1 parent e2258a1 commit 539d1c8
Showing 1 changed file with 88 additions and 1 deletion.
89 changes: 88 additions & 1 deletion src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,95 @@ public static void cloneFromScm(
if (StringUtils.startsWith(connectionURL, "scm:git:")) {
connectionURL = StringUtils.substringAfter(connectionURL, "scm:git:");
}

// See: https://github.blog/2021-09-01-improving-git-protocol-security-github/
connectionURL = connectionURL.replace("git://", "https://");

// TODO pending release of
// https://github.com/jenkinsci/antisamy-markup-formatter-plugin/pull/106
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/antisamy-markup-formatter-plugin",
"https://github.com/jenkinsci/antisamy-markup-formatter-plugin");

// TODO pending release of
// https://github.com/jenkinsci/bootstrap5-api-plugin/commit/8c5f60ab5e21c03b68d696e7b760caa991b25aa9
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/bootstrap5-api-plugin",
"https://github.com/jenkinsci/bootstrap5-api-plugin");

// TODO pending backport of
// https://github.com/jenkinsci/cloudbees-folder-plugin/pull/260
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/cloudbees-folder-plugin",
"https://github.com/jenkinsci/cloudbees-folder-plugin");

// TODO pending release of
// https://github.com/jenkinsci/configuration-as-code-plugin/pull/2166
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/configuration-as-code-plugin",
"https://github.com/jenkinsci/configuration-as-code-plugin");

// TODO pending release of
// https://github.com/jenkinsci/data-tables-api-plugin/commit/97dc7555017e6c7ea17f0b67cc292773f1114a54
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/data-tables-api-plugin",
"https://github.com/jenkinsci/data-tables-api-plugin");

// TODO pending backport of
// https://github.com/jenkinsci/echarts-api-plugin/commit/d6951a26e6f1c27b82c8308359f7f76e182de3e3
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/echarts-api-plugin",
"https://github.com/jenkinsci/echarts-api-plugin");

// TODO pending release of
// https://github.com/jenkinsci/file-parameters-plugin/pull/142
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/file-parameters-plugin",
"https://github.com/jenkinsci/file-parameters-plugin");

// TODO pending release of https://github.com/jenkinsci/github-api-plugin/pull/182
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/github-api-plugin",
"https://github.com/jenkinsci/github-api-plugin");

// TODO pending adoption of https://github.com/jenkinsci/matrix-auth-plugin/pull/131
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/matrix-auth-plugin",
"https://github.com/jenkinsci/matrix-auth-plugin");

// TODO pending release of
// https://github.com/jenkinsci/popper2-api-plugin/commit/bf781e31b072103f3f72d7195e9071863f7f4dd9
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/popper2-api-plugin",
"https://github.com/jenkinsci/popper2-api-plugin");

// TODO pending release of https://github.com/jenkinsci/ssh-agent-plugin/pull/116
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/ssh-agent-plugin",
"https://github.com/jenkinsci/ssh-agent-plugin");

// TODO pending release of https://github.com/jenkinsci/ssh-slaves-plugin/pull/352
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/ssh-slaves-plugin",
"https://github.com/jenkinsci/ssh-slaves-plugin");

// TODO pending release of
// https://github.com/jenkinsci/theme-manager-plugin/pull/154
connectionURL =
connectionURL.replace(
"git://github.com/jenkinsci/theme-manager-plugin",
"https://github.com/jenkinsci/theme-manager-plugin");
}
try {
cloneImpl(connectionURL, scmTag, checkoutDirectory);
Expand Down

0 comments on commit 539d1c8

Please sign in to comment.