Skip to content

Commit

Permalink
fix: correct broken redirections to plugins.jenkins.io website (targe…
Browse files Browse the repository at this point in the history
…t is absolute URL) (#50)

Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal authored Oct 21, 2023
1 parent 77638c9 commit 39a1bca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1,683 deletions.
32 changes: 16 additions & 16 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ http {
rewrite "^/display/JENKINS/HPE\+Application\+Automation\+Tools$" "https://plugins.jenkins.io/hp-application-automation-tools-plugin" permanent;
}

# Rewrite all plugin docs to plugins.jenkins.io
# Rewrite all plugin docs to plugins.jenkins.io
rewrite "^/display/JENKINS/Anchore\+Container\+Image\+Scanner\+Plugin$" "https://plugins.jenkins.io/anchore-container-scanner" permanent;
rewrite "^/display/JENKINS/Anchore\+Container\+Image\+Scanner\+Plugin$" "https://plugins.jenkins.io/anchore-container-scanner" permanent;
rewrite "^/display/JENKINS/Writing\+an\+SCM\+plugin$" "https://www.jenkins.io/doc/developer/plugin-development/writing-an-scm-plugin" permanent;
Expand Down Expand Up @@ -105,7 +105,7 @@ http {
rewrite "^/display/JENKINS/ArtifactPromotionPlugin$" "https://plugins.jenkins.io/artifact-promotion" permanent;
rewrite "^/display/JENKINS/ArtifactDeployer\+Plugin$" "https://plugins.jenkins.io/artifactdeployer" permanent;
rewrite "^/display/JENKINS/Artifactory\+Plugin$" "https://plugins.jenkins.io/artifactory" permanent;
rewrite "^/display/JENKINS/Artifactory\+-\+Working\+With\+Pipeline\+Jobs\+in\+Jenkins" /"https://plugins.jenkins.io/workflow-aggregator" permanent;
rewrite "^/display/JENKINS/Artifactory\+-\+Working\+With\+Pipeline\+Jobs\+in\+Jenkins" "https://plugins.jenkins.io/workflow-aggregator" permanent;
rewrite "^/display/JENKINS/AsakusaSatellite\+Plugin$" "https://plugins.jenkins.io/asakusa-satellite-plugin" permanent;
rewrite "^/display/JENKINS/assembla\+plugin$" "https://plugins.jenkins.io/assembla" permanent;
rewrite "^/display/JENKINS/Assembla\+Auth\+Plugin$" "https://plugins.jenkins.io/assembla-auth" permanent;
Expand Down Expand Up @@ -1000,10 +1000,10 @@ http {
rewrite "^/display/JENKINS/PHP\+Built\-in\+Web\+Server\+Plugin$" "https://plugins.jenkins.io/php-builtin-web-server" permanent;
rewrite "^/display/JENKINS/PikeTec\+TPT\+Plugin$" "https://plugins.jenkins.io/piketec-tpt" permanent;
rewrite "^/display/JENKINS/Pipeline\+Aggregator\+View$" "https://plugins.jenkins.io/pipeline-aggregator-view" permanent;
rewrite "^/display/JENKINS/Pipeline\+API\+Plugin" /"https://plugins.jenkins.io/workflow-api" permanent;
rewrite "^/display/JENKINS/Pipeline\+API\+Plugin" "https://plugins.jenkins.io/workflow-api" permanent;
rewrite "^/display/JENKINS/Pipeline\+AWS\+Plugin$" "https://plugins.jenkins.io/pipeline-aws" permanent;
rewrite "^/display/JENKINS/Pipeline\+Bamboo\+Plugin$" "https://plugins.jenkins.io/pipeline-bamboo" permanent;
rewrite "^/display/JENKINS/Pipeline\+Basic\+Steps\+Plugin" /"https://plugins.jenkins.io/workflow-basic-steps/" permanent;
rewrite "^/display/JENKINS/Pipeline\+Basic\+Steps\+Plugin" "https://plugins.jenkins.io/workflow-basic-steps/" permanent;
rewrite "^/display/JENKINS/Pipeline\+CloudWatch\+Logs\+Plugin$" "https://plugins.jenkins.io/pipeline-cloudwatch-logs" permanent;
rewrite "^/display/JENKINS/Pipeline\+Configuration\+History$" "https://plugins.jenkins.io/pipeline-config-history" permanent;
rewrite "^/display/JENKINS/Pipeline\+Dependency\+Walker\+Plugin$" "https://plugins.jenkins.io/pipeline-dependency-walker" permanent;
Expand Down Expand Up @@ -1451,13 +1451,13 @@ http {
rewrite "^/display/JENKINS/Claim\+Plugin$" "https://plugins.jenkins.io/claim/" permanent;
rewrite "^/display/JENKINS/App\+Center\+Plugin$" "https://plugins.jenkins.io/appcenter/" permanent;
rewrite "^/display/JENKINS/XML\+Job\+to\+Job\+DSL$" "https://plugins.jenkins.io/xml-job-to-job-dsl/" permanent;
rewrite "^/display/JENKINS/Task\+Scanner\+Plugin" /"https://plugins.jenkins.io/warnings-ng/" permanent;
rewrite "^/display/JENKINS/Task\+Scanner\+Plugin" "https://plugins.jenkins.io/warnings-ng/" permanent;
rewrite "^/display/JENKINS/Xray\+Connector\+Plugin$" "https://plugins.jenkins.io/xray-connector/" permanent;
rewrite "^/display/JENKINS/FitNesse\+Plugin$" "https://plugins.jenkins.io/fitnesse/" permanent;
rewrite "^/display/JENKINS/IBM\+zOS\+Connector$" "https://plugins.jenkins.io/zos-connector" permanent;
rewrite "^/display/JENKINS/Zulip\+Plugin$" "https://plugins.jenkins.io/zulip" permanent;
rewrite "^/display/JENKINS/Remove\+Git\+Plugin\+BuildsByBranch\+BuildData$" "https://plugins.jenkins.io/git/" permanent;

## from https://wiki.jenkins.io/.well-known/reports/top_urls.txt
rewrite "^/display/JENKINS/Parameterized\+Trigger\+Plugin$" "https://plugins.jenkins.io/parameterized-trigger" permanent;
rewrite "^/display/JENKINS/Active\+Choices\+Plugin$" "https://plugins.jenkins.io/uno-choice" permanent;
Expand Down Expand Up @@ -1491,8 +1491,8 @@ http {
rewrite "^/display/JENKINS/HashiCorp\+Vault\+Plugin$" "https://plugins.jenkins.io/hashicorp-vault-plugin" permanent;
rewrite "^/display/JENKINS/PowerShell\+Plugin$" "https://plugins.jenkins.io/powershell" permanent;
rewrite "^/display/JENKINS/SAML\+Plugin$" "https://plugins.jenkins.io/saml" permanent;
rewrite "^/display/JENKINS/Purge\+Job\+History\+Plugin" /"https://plugins.jenkins.io/purge-job-history" permanent;
rewrite "^/display/JENKINS/Pipeline\+Build\+Step\+Plugin" /"https://plugins.jenkins.io/pipeline-build-step" permanent;
rewrite "^/display/JENKINS/Purge\+Job\+History\+Plugin" "https://plugins.jenkins.io/purge-job-history" permanent;
rewrite "^/display/JENKINS/Pipeline\+Build\+Step\+Plugin" "https://plugins.jenkins.io/pipeline-build-step" permanent;
# Perforce plugin no longer exists apparently, so redirect to p4
rewrite "^/display/JENKINS/Perforce\+Plugin$" "https://plugins.jenkins.io/p4" permanent;
rewrite "^/display/JENKINS/Xcode\+Plugin$" "https://plugins.jenkins.io/xcode-plugin" permanent;
Expand Down Expand Up @@ -1552,7 +1552,7 @@ http {
rewrite "^/display/JENKINS/PRQA\+Plugin$" "https://plugins.jenkins.io/prqa-plugin/" permanent;
rewrite "^/display/JENKINS/Pipeline\+SCM\+Step\+Plugin$" "https://plugins.jenkins.io/workflow-scm-step/" permanent;
rewrite "^/display/JENKINS/Docker\+Commons\+Plugin$" "https://plugins.jenkins.io/docker-commons/" permanent;

# Non plugin rewrites
## User Documentation
rewrite "^/display/JENKINS/Disable\+security$" "https://jenkins.io/doc/book/system-administration/security/";
Expand Down Expand Up @@ -1622,33 +1622,33 @@ http {
rewrite "^/display/JENKINS/Jenkins\+SSH$" "https://www.jenkins.io/doc/book/managing/cli/" permanent;
rewrite "^/display/JENKINS/Dependencies\+among\+plugins" "https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/" permanent;
rewrite "^/display/JENKINS/Building\+Jenkins" "https://github.com/jenkinsci/jenkins/blob/master/CONTRIBUTING.md" permanent;

## Developer documentation
rewrite "^/display/JENKINS/Adopt\+a\+Plugin$" "https://jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" permanent;
rewrite "^/display/JENKINS/Deprecating\+a\+Plugin$" "https://jenkins.io/doc/developer/plugin-governance/deprecating-or-removing-plugin/" permanent;
rewrite "^/display/JENKINS/Extension\+points$" "https://jenkins.io/doc/developer/extensions/" permanent;
rewrite "^/display/JENKINS/Serialization\+of\+anonymous\+classes$" "https://jenkins.io/doc/developer/extensibility/serialization-of-anonymous-classes//" permanent;
rewrite "^/display/JENKINS/Tips\+for\+optional\+dependencies$" "https://jenkins.io/doc/developer/plugin-development/optional-dependencies/" permanent;
rewrite "^/display/JENKINS/Post-initialization\+script$" "https://www.jenkins.io/doc/book/managing/groovy-hook-scripts/" permanent;

## Governance documentation
rewrite "^/display/JENKINS/Board\+Candidacy\+Process" /"https://jenkins.io/project/board-election-process/" permanent;
rewrite "^/display/JENKINS/Board\+Candidacy\+Process" "https://jenkins.io/project/board-election-process/" permanent;
rewrite "^/display/JENKINS/Board\+Election\+Process$" "https://jenkins.io/project/board-election-process/" permanent;
rewrite "^/display/JENKINS/Governance\+Board$" "https://jenkins.io/project/board/" permanent;
rewrite "^/display/JENKINS/Governance\+Document$" "https://jenkins.io/project/governance/" permanent;
rewrite "^/display/JENKINS/Governance\+Meeting\+Agenda$" "https://jenkins.io/project/governance-meeting/" permanent;
rewrite "^/display/JENKINS/Approved\+Trademark\+Usage$" "https://www.jenkins.io/project/trademark/approved-usage/" permanent;
rewrite "^/display/JENKINS/Trademark\+Sublicense$" "https://www.jenkins.io/project/trademark/sublicense/" permanent;

# Security advisories
rewrite "^/display/SECURITY/Jenkins\+Security\+Advisory\+([0-9]+)-([0-9]+)-([0-9]+)$" "https://jenkins.io/security/advisory/$1-$2-$3/" permanent;
# ===== end of existing manual redirections

# remove "/display/" prefix
rewrite "^/display(/.*)$" $1;

# Replace maximum of 3 or 1 "+" by "-" per internal redirect,
# produce 500 Internal Server Error after 10 internal redirects,
# produce 500 Internal Server Error after 10 internal redirects,
# supporting at least 28 "+" (9*3 + 1*1) and at most 30 (10*3).
# (snippet from https://stackoverflow.com/a/52309059/4074148)
rewrite "^([^+]*)\+([^+]*)\+([^+]*)\+(.*)$" $1-$2-$3-$4 last;
Expand Down
Loading

0 comments on commit 39a1bca

Please sign in to comment.