Skip to content

The Unified and Autonomous Development Platform

Use new docs reference

Robin Shen8310ed31d66c
diff --git a/server-core/src/main/java/io/onedev/server/OneDev.java b/server-core/src/main/java/io/onedev/server/OneDev.java
index 1274ddbb5e..01f0ca1d88 100644
--- a/server-core/src/main/java/io/onedev/server/OneDev.java
+++ b/server-core/src/main/java/io/onedev/server/OneDev.java
@@ -58,7 +58,6 @@ import io.onedev.server.persistence.SessionManager;
import io.onedev.server.persistence.annotation.Sessional;
import io.onedev.server.security.SecurityUtils;
import io.onedev.server.util.UrlUtils;
-import io.onedev.server.util.Version;
import io.onedev.server.util.init.InitStage;
import io.onedev.server.util.init.ManualConfig;
import io.onedev.server.util.schedule.TaskScheduler;
@@ -354,11 +353,6 @@ public class OneDev extends AbstractPlugin implements Serializable {
return new ManagedSerializedForm(OneDev.class);
}
- public String getDocRoot() {
- Version version = new Version(AppLoader.getProduct().getVersion());
- return "https://code.onedev.io/onedev/manual/~files/" + version.getMajor() + "." + version.getMinor();
- }
-
public static boolean isServerRunning(File installDir) {
Properties props = FileUtils.loadProperties(new File(installDir, "conf/server.properties"));
int sshPort = Integer.parseInt(props.get("ssh_port").toString());
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java b/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
index fdf20331ed..5e8609d1a9 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/Job.java
@@ -141,8 +141,8 @@ public class Job implements NamedElement, Serializable, Validatable {
return new ArrayList<>();
}
- @Editable(order=200, placeholder="Use Any Applicable Executor", description="Optionally specify executor "
- + "to execute this job. Leave empty to use any executor as long as its job requirement is satisfied")
+ @Editable(order=200, placeholder="Use Any Applicable Executor", description="Optionally specify authorized executor "
+ + "for this job. Leave empty to use first authorized executor")
@Interpolative(literalSuggester="suggestJobExecutors", variableSuggester="suggestVariables")
public String getJobExecutor() {
return jobExecutor;
@@ -174,7 +174,7 @@ public class Job implements NamedElement, Serializable, Validatable {
return SuggestionUtils.suggest(applicableJobExecutors, matchWith);
}
- @Editable(order=200, description="Steps will be executed serially on same node, sharing the same <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>")
+ @Editable(order=200, description="Steps will be executed serially on same node, sharing the same <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>")
public List<Step> getSteps() {
return steps;
}
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/JobDependency.java b/server-core/src/main/java/io/onedev/server/buildspec/job/JobDependency.java
index 419d0f2e65..27effc4655 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/JobDependency.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/JobDependency.java
@@ -73,7 +73,7 @@ public class JobDependency implements Serializable {
@Editable(order=300, name="Artifacts to Retrieve", placeholder="Do not retrieve", description=""
+ "Optionally specify artifacts to retrieve from the dependency into "
- + "<a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>. "
+ + "<a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. "
+ "Only published artifacts (via artifact publish step) can be retrieved. Leave empty to not "
+ "retrieve any artifacts")
@Interpolative(variableSuggester="suggestVariables")
@@ -87,7 +87,7 @@ public class JobDependency implements Serializable {
}
@Editable(order=400, placeholder="Job workspace", description=""
- + "Optionally specify a path relative to <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> "
+ + "Optionally specify a path relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> "
+ "to put retrieved artifacts. Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
public String getDestinationPath() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/projectdependency/ProjectDependency.java b/server-core/src/main/java/io/onedev/server/buildspec/job/projectdependency/ProjectDependency.java
index 91c6fce665..a7f804d0bb 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/projectdependency/ProjectDependency.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/projectdependency/ProjectDependency.java
@@ -92,7 +92,7 @@ public class ProjectDependency implements Serializable {
return null;
}
- @Editable(order=400, name="Artifacts to Retrieve", description="Specify artifacts to retrieve into <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>. "
+ @Editable(order=400, name="Artifacts to Retrieve", description="Specify artifacts to retrieve into <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. "
+ "Only published artifacts (via artifact publish step) can be retrieved.")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
@@ -106,7 +106,7 @@ public class ProjectDependency implements Serializable {
}
@Editable(order=500, placeholder="Job workspace", description=""
- + "Optionally specify a path relative to <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> "
+ + "Optionally specify a path relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> "
+ "to put retrieved artifacts. Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
public String getDestinationPath() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/BranchUpdateTrigger.java b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/BranchUpdateTrigger.java
index feef190d2b..9699ec0e09 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/BranchUpdateTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/BranchUpdateTrigger.java
@@ -37,7 +37,7 @@ public class BranchUpdateTrigger extends JobTrigger {
private String paths;
@Editable(name="Branches", order=100, placeholder="Any branch", description="Optionally specify space-separated branches "
- + "to check. Use '**' or '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "to check. Use '**' or '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all branches")
@Patterns(suggester = "suggestBranches", path=true)
public String getBranches() {
@@ -54,7 +54,7 @@ public class BranchUpdateTrigger extends JobTrigger {
}
@Editable(name="Touched Files", order=200, placeholder="Any file",
- description="Optionally specify space-separated files to check. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ description="Optionally specify space-separated files to check. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all files")
@Patterns(suggester = "getPathSuggestions", path=true)
public String getPaths() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/JobTrigger.java b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/JobTrigger.java
index 9673ac826c..b7a51782c8 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/JobTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/JobTrigger.java
@@ -53,7 +53,7 @@ public abstract class JobTrigger implements Serializable {
@Editable(name="Applicable Projects", order=900, placeholder="Any project", description=""
+ "Optionally specify space-separated projects applicable for this trigger. "
+ "This is useful for instance when you want to prevent the job from being "
- + "triggered in forked projects. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "triggered in forked projects. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all projects")
@Patterns(suggester="suggestProjects", path=true)
public String getProjects() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/PullRequestTrigger.java b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/PullRequestTrigger.java
index 8774d398a5..ef3084766a 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/PullRequestTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/PullRequestTrigger.java
@@ -31,7 +31,7 @@ public abstract class PullRequestTrigger extends JobTrigger {
@Editable(name="Target Branches", placeholder="Any branch", order=100, description=""
+ "Optionally specify space-separated target branches of the pull requests to check. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all branches")
@Patterns(suggester = "suggestBranches", path=true)
public String getBranches() {
@@ -49,7 +49,7 @@ public abstract class PullRequestTrigger extends JobTrigger {
@Editable(name="Touched Files", order=200, placeholder="Any file", description=""
+ "Optionally specify space-separated files to check. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all files")
@Patterns(suggester = "getPathSuggestions", path=true)
public String getPaths() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/TagCreateTrigger.java b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/TagCreateTrigger.java
index 4779a5af7b..7326479d70 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/TagCreateTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/job/trigger/TagCreateTrigger.java
@@ -29,7 +29,7 @@ public class TagCreateTrigger extends JobTrigger {
@Editable(name="Tags", order=100, placeholder="Any tag", description=""
+ "Optionally specify space-separated tags to check. Use '**', '*' or '?' for "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all tags")
@Patterns(suggester="suggestTags", path=true)
public String getTags() {
@@ -48,7 +48,7 @@ public class TagCreateTrigger extends JobTrigger {
@Editable(name="On Branches", order=200, placeholder="Any branch", description=""
+ "This trigger will only be applicable if tagged commit is on branches specified here. "
+ "Multiple branches should be separated with spaces. Use '**', '*' or '?' for "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all branches")
@Patterns(suggester="suggestBranches", path=true)
public String getBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/BuildImageStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/BuildImageStep.java
index fb8bb537d3..fff250b4a4 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/BuildImageStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/BuildImageStep.java
@@ -29,7 +29,7 @@ public class BuildImageStep extends Step {
private boolean publish;
- @Editable(order=100, description="Optionally specify build path relative to <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>. "
+ @Editable(order=100, description="Optionally specify build path relative to <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>. "
+ "Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
@SafePath
@@ -41,7 +41,7 @@ public class BuildImageStep extends Step {
this.buildPath = buildPath;
}
- @Editable(order=200, description="Optionally specify Dockerfile relative to <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>. "
+ @Editable(order=200, description="Optionally specify Dockerfile relative to <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>. "
+ "Leave empty to use file <tt>Dockerfile</tt> under build path specified above")
@Interpolative(variableSuggester="suggestVariables")
@SafePath
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/CheckoutStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/CheckoutStep.java
index 372296afd6..6c5006a218 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/CheckoutStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/CheckoutStep.java
@@ -32,8 +32,8 @@ public class CheckoutStep extends Step {
private String checkoutPath;
@Editable(order=100, description="By default code is cloned via an auto-generated credential, "
- + "which only has read permission over current project. In case the job needs to <a href='$docRoot/pages/push-in-job.md' target='_blank'>push code to server</a>, or want "
- + "to <a href='$docRoot/pages/clone-submodules-via-ssh.md' target='_blank'>clone private submodules</a>, you should supply custom credential with appropriate permissions here")
+ + "which only has read permission over current project. In case the job needs to <a href='https://docs.onedev.io/tutorials/cicd/commit-and-push' target='_blank'>push code to server</a>, or want "
+ + "to <a href='https://docs.onedev.io/tutorials/cicd/clone-submodules-ssh/' target='_blank'>clone private submodules</a>, you should supply custom credential with appropriate permissions here")
@NotNull
public GitCredential getCloneCredential() {
return cloneCredential;
@@ -72,7 +72,7 @@ public class CheckoutStep extends Step {
}
@Editable(order=300, placeholder="Job workspace", description="Optionally specify path relative to "
- + "<a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> to clone code into. "
+ + "<a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to clone code into. "
+ "Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
@SafePath
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishArtifactStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishArtifactStep.java
index e639435b24..3397e80dc1 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishArtifactStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishArtifactStep.java
@@ -31,7 +31,7 @@ public class PublishArtifactStep extends ServerSideStep {
private String artifacts;
@Editable(order=50, name="From Directory", placeholder="Job workspace", description="Optionally specify path "
- + "relative to <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> to publish "
+ + "relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to publish "
+ "artifacts from. Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
@SafePath
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishReportStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishReportStep.java
index 75f8588064..b5098b3a43 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishReportStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishReportStep.java
@@ -44,7 +44,7 @@ public abstract class PublishReportStep extends ServerSideStep {
return PatternSet.parse(getFilePatterns());
}
- @Editable(order=100, description="Specify files under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> to be published. "
+ @Editable(order=100, description="Specify files under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to be published. "
+ "Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishSiteStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishSiteStep.java
index 4cfa80246d..9cae91cab0 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/PublishSiteStep.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/PublishSiteStep.java
@@ -55,7 +55,7 @@ public class PublishSiteStep extends ServerSideStep {
}
@Editable(order=50, name="From Directory", placeholder="Job workspace", description="Optionally specify path "
- + "relative to <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a> to publish "
+ + "relative to <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a> to publish "
+ "artifacts from. Leave empty to use job workspace itself")
@Interpolative(variableSuggester="suggestVariables")
@SafePath
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/StepTemplate.java b/server-core/src/main/java/io/onedev/server/buildspec/step/StepTemplate.java
index 37a33caff6..8b0a366234 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/StepTemplate.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/StepTemplate.java
@@ -53,7 +53,7 @@ public class StepTemplate implements NamedElement, Serializable {
return new ArrayList<>();
}
- @Editable(order=200, description="Steps will be executed serially on same node, sharing the same <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>")
+ @Editable(order=200, description="Steps will be executed serially on same node, sharing the same <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>")
@Size(min=1, max=1000, message="At least one step needs to be defined")
public List<Step> getSteps() {
return steps;
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/DefaultInterpreter.java b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/DefaultInterpreter.java
index f68f9f245b..bed4d13340 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/DefaultInterpreter.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/DefaultInterpreter.java
@@ -15,7 +15,7 @@ public class DefaultInterpreter extends Interpreter {
private static final long serialVersionUID = 1L;
@Editable(order=110, description="Specify shell commands (on Linux/Unix) or batch commands (on Windows) to execute "
- + "under the <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>")
+ + "under the <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>")
@Interpolative
@Code(language=Code.SHELL, variableProvider="suggestVariables")
@Size(min=1, message="may not be empty")
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/PowerShellInterpreter.java b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/PowerShellInterpreter.java
index 0149c14c1e..0c2c098933 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/PowerShellInterpreter.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/PowerShellInterpreter.java
@@ -16,7 +16,7 @@ public class PowerShellInterpreter extends Interpreter {
private static final long serialVersionUID = 1L;
@Editable(order=110, description="Specify PowerShell commands to execute "
- + "under the <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>.<br>"
+ + "under the <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>.<br>"
+ "<b class='text-warning'>NOTE: </b> OneDev checks exit code of the script to determine if step is successful. "
+ "Since PowerShell always exit with 0 even if there are script errors, you should handle errors in the script "
+ "and exit with non-zero code, or add line <code>$ErrorActionPreference = &quot;Stop&quot;</code> at start of "
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/ShellInterpreter.java b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/ShellInterpreter.java
index 96b5221150..7d7e179094 100644
--- a/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/ShellInterpreter.java
+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/commandinterpreter/ShellInterpreter.java
@@ -30,7 +30,7 @@ public class ShellInterpreter extends Interpreter {
}
@Editable(order=110, description="Specify shell commands to execute "
- + "under the <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>")
+ + "under the <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>")
@Interpolative
@Code(language=Code.SHELL, variableProvider="suggestVariables")
@Size(min=1, message="may not be empty")
diff --git a/server-core/src/main/java/io/onedev/server/job/DefaultJobManager.java b/server-core/src/main/java/io/onedev/server/job/DefaultJobManager.java
index 81ab6133c2..5244900fb0 100644
--- a/server-core/src/main/java/io/onedev/server/job/DefaultJobManager.java
+++ b/server-core/src/main/java/io/onedev/server/job/DefaultJobManager.java
@@ -517,7 +517,7 @@ public class DefaultJobManager implements JobManager, Runnable, CodePullAuthoriz
if (!jobExecutor.isEnabled())
throw new ExplicitException("Specified job executor '" + jobExecutorName + "' is disabled");
else if (!isAuthorized(jobExecutor, build))
- throw new ExplicitException("Specified job executor '" + jobExecutorName + "' is not applicable for current job");
+ throw new ExplicitException("Specified job executor '" + jobExecutorName + "' is not authorized for current job");
else
return jobExecutor;
} else {
@@ -529,7 +529,7 @@ public class DefaultJobManager implements JobManager, Runnable, CodePullAuthoriz
if (executor.isEnabled() && isAuthorized(executor, build))
return executor;
}
- throw new ExplicitException("No applicable job executor");
+ throw new ExplicitException("No authorized job executor");
} else {
jobLogger.log("No job executor defined, auto-discovering...");
List<JobExecutorDiscoverer> discoverers = new ArrayList<>(OneDev.getExtensions(JobExecutorDiscoverer.class));
@@ -1231,8 +1231,9 @@ public class DefaultJobManager implements JobManager, Runnable, CodePullAuthoriz
try {
jobExecutions.put(build.getId(), execute(build));
} catch (Throwable t) {
- if (t instanceof ExplicitException)
- markBuildError(build, t.getMessage());
+ ExplicitException explicitException = ExceptionUtils.find(t, ExplicitException.class);
+ if (explicitException != null)
+ markBuildError(build, explicitException.getMessage());
else
markBuildError(build, Throwables.getStackTraceAsString(t));
}
diff --git a/server-core/src/main/java/io/onedev/server/model/support/BranchProtection.java b/server-core/src/main/java/io/onedev/server/model/support/BranchProtection.java
index 033bf722a2..eac346a88f 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/BranchProtection.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/BranchProtection.java
@@ -71,7 +71,7 @@ public class BranchProtection implements Serializable {
this.enabled = enabled;
}
- @Editable(order=100, description="Specify space-separated branches to be protected. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ @Editable(order=100, description="Specify space-separated branches to be protected. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude")
@Patterns(suggester = "suggestBranches", path=true)
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/CodeAnalysisSetting.java b/server-core/src/main/java/io/onedev/server/model/support/CodeAnalysisSetting.java
index 55ab1501b4..2fc20c2238 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/CodeAnalysisSetting.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/CodeAnalysisSetting.java
@@ -14,10 +14,10 @@ public class CodeAnalysisSetting implements Serializable {
@Editable(order=100, name="Files to Be Analyzed", placeholder="Inherit from parent", rootProjectPlaceholder="All files", description="OneDev analyzes repository files for code search, "
+ "line statistics, and code contribution statistics. This setting tells which files should be analyzed, and expects space-separated "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path patterns</a>. A pattern can be excluded by prefixing with '-', for "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path patterns</a>. A pattern can be excluded by prefixing with '-', for "
+ "instance <code>-**/vendors/**</code> will exclude all files with vendors in path. <b>NOTE: </b> Changing this setting only affects new "
+ "commits. To apply the change to history commits, please stop the server and delete folder <code>index</code> and "
- + "<code>info/commit</code> under <a href='$docRoot/pages/concepts.md#project-storage' target='_blank'>project's storage directory</a>. The "
+ + "<code>info/commit</code> under <a href='https://docs.onedev.io/concepts#project-storage' target='_blank'>project's storage directory</a>. The "
+ "repository will be re-analyzed when server is started"
)
@Patterns
diff --git a/server-core/src/main/java/io/onedev/server/model/support/FileProtection.java b/server-core/src/main/java/io/onedev/server/model/support/FileProtection.java
index 58ad5043f4..a0c142213f 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/FileProtection.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/FileProtection.java
@@ -32,7 +32,7 @@ public class FileProtection implements Serializable, Validatable {
private List<String> jobNames = new ArrayList<>();
- @Editable(order=100, description="Specify space-separated paths to be protected. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ @Editable(order=100, description="Specify space-separated paths to be protected. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude")
@Patterns(suggester = "suggestPaths", path=true)
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/TagProtection.java b/server-core/src/main/java/io/onedev/server/model/support/TagProtection.java
index 89fc7627b1..12730da36c 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/TagProtection.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/TagProtection.java
@@ -45,7 +45,7 @@ public class TagProtection implements Serializable {
this.enabled = enabled;
}
- @Editable(order=100, description="Specify space-separated tags to be protected. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ @Editable(order=100, description="Specify space-separated tags to be protected. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude")
@Patterns(suggester = "suggestTags", path=true)
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/administration/GroovyScript.java b/server-core/src/main/java/io/onedev/server/model/support/administration/GroovyScript.java
index fbadd1f8ab..29bae8cf9f 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/administration/GroovyScript.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/administration/GroovyScript.java
@@ -77,7 +77,7 @@ public class GroovyScript implements Serializable {
}
@Editable(order=400, placeholder="All", description="Optionally specify space-separated projects allowed to "
- + "execute this script. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude. "
+ + "execute this script. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude. "
+ "Leave empty to allow all")
@Patterns(suggester="suggestProjects", path=true)
@ShowCondition("isCanBeUsedByBuildJobsEnabled")
@@ -90,7 +90,7 @@ public class GroovyScript implements Serializable {
}
@Editable(order=500, placeholder="All", description="Optionally specify space-separated branches allowed to "
- + "execute this script. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "execute this script. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to allow all")
@Patterns(path=true)
@ShowCondition("isCanBeUsedByBuildJobsEnabled")
diff --git a/server-core/src/main/java/io/onedev/server/model/support/administration/SenderAuthorization.java b/server-core/src/main/java/io/onedev/server/model/support/administration/SenderAuthorization.java
index be0c11b84a..75dc4d2766 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/administration/SenderAuthorization.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/administration/SenderAuthorization.java
@@ -45,7 +45,7 @@ public class SenderAuthorization implements Serializable {
@Editable(order=150, placeholder="Any project", description="Specify space-separated projects "
+ "authorized to senders above. Use '**' or '*' or '?' for "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to authorize all projects")
@Patterns(suggester="suggestProjects", path=true)
public String getAuthorizedProjects() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/administration/jobexecutor/ServiceLocator.java b/server-core/src/main/java/io/onedev/server/model/support/administration/jobexecutor/ServiceLocator.java
index babec660ad..fbcd6e6506 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/administration/jobexecutor/ServiceLocator.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/administration/jobexecutor/ServiceLocator.java
@@ -39,7 +39,7 @@ public class ServiceLocator implements Serializable {
@Editable(order=200, name="Applicable Images", placeholder="All", description=""
+ "Optionally specify space-separated service images applicable for this locator. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all")
@Patterns(path=true)
public String getServiceImages() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/build/JobSecret.java b/server-core/src/main/java/io/onedev/server/model/support/build/JobSecret.java
index 62f2abe67e..a2489977b4 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/build/JobSecret.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/build/JobSecret.java
@@ -50,7 +50,7 @@ public class JobSecret implements Serializable {
@Editable(order=300, placeholder="All", description=""
+ "Optionally specify space-separated branches to authorize.\n"
+ "Only builds from authorized branches can access this secret.\n"
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to authorize all branches")
@Patterns(suggester = "suggestBranches", path=true)
public String getAuthorizedBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/ActionAuthorization.java b/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/ActionAuthorization.java
index 644670c697..e3a8343676 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/ActionAuthorization.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/ActionAuthorization.java
@@ -19,7 +19,7 @@ public abstract class ActionAuthorization implements Serializable {
@Editable(order=1000, placeholder="All", description="Action is allowed only if build runs on "
+ "specified branches. Multiple branches should be separated with space. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all")
@Patterns(suggester = "suggestBranches", path=true)
public String getAuthorizedBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/CreateTagAuthorization.java b/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/CreateTagAuthorization.java
index 5cb29745f9..df25e5dc31 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/CreateTagAuthorization.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/build/actionauthorization/CreateTagAuthorization.java
@@ -17,7 +17,7 @@ public class CreateTagAuthorization extends ActionAuthorization {
private String tagNames;
@Editable(order=100, placeholder="All", description="Specify space-separated tag names. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all")
@Patterns(suggester = "suggestTags", path=true)
public String getTagNames() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/booleaninput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/booleaninput/defaultvalueprovider/ScriptingDefaultValue.java
index 68610abbe4..a7cd93c61e 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/booleaninput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/booleaninput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>boolean</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/Choice.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/Choice.java
index 4060fc46ab..8095e2c666 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/Choice.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/Choice.java
@@ -44,7 +44,7 @@ public class Choice implements Serializable {
}
@Editable(order=300, placeholder="All projects", description="Specify applicable projects separated by space. "
- + "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty for all projects")
@Patterns(suggester="suggestProjects", path=true)
public String getApplicableProjects() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/ScriptingChoices.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/ScriptingChoices.java
index a024f13b84..8a7b596909 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/ScriptingChoices.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/choiceprovider/ScriptingChoices.java
@@ -26,7 +26,7 @@ public class ScriptingChoices extends ChoiceProvider {
@Editable(description="Groovy script to be evaluated. The return value should be a value to color map, "
+ "for instance:<br>"
+ "<code>return [\"Successful\":\"#00ff00\", \"Failed\":\"#ff0000\"]</code>, "
- + "Use <tt>null</tt> if the value does not have a color. Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Use <tt>null</tt> if the value does not have a color. Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
index a1e4768cd4..799742e412 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
@@ -17,7 +17,7 @@ public class ScriptingDefaultMultiValue implements DefaultMultiValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return list of string. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultvalueprovider/ScriptingDefaultValue.java
index b192101895..dcfeb27cde 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/choiceinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>string</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/dateinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/dateinput/defaultvalueprovider/ScriptingDefaultValue.java
index 29b9c1fdd2..6b90000fbf 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/dateinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/dateinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -17,7 +17,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>Date</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/datetimeinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/datetimeinput/defaultvalueprovider/ScriptingDefaultValue.java
index b2f2b0d004..2038605ce0 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/datetimeinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/datetimeinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -17,7 +17,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>Date</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/floatinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/floatinput/defaultvalueprovider/ScriptingDefaultValue.java
index a210fa5b3b..f6779b9c7b 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/floatinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/floatinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>Float</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/choiceprovider/ScriptingChoices.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/choiceprovider/ScriptingChoices.java
index d26629cbc3..9ad1a93e2c 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/choiceprovider/ScriptingChoices.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/choiceprovider/ScriptingChoices.java
@@ -25,7 +25,7 @@ public class ScriptingChoices implements ChoiceProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. The return value should be a list of group facade object to be used as choices. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
index 111eac3440..1d5a6ce1bf 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/groupchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return name of a group. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/integerinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/integerinput/defaultvalueprovider/ScriptingDefaultValue.java
index eaa0507b59..5a363909ae 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/integerinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/integerinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>Integer</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/defaultvalueprovider/ScriptingDefaultValue.java
index f335b7f6bd..c5b5e1a633 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>String</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/choiceprovider/ScriptingChoices.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/choiceprovider/ScriptingChoices.java
index 97651a9f93..27db44b47e 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/choiceprovider/ScriptingChoices.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/choiceprovider/ScriptingChoices.java
@@ -28,7 +28,7 @@ public class ScriptingChoices implements ChoiceProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. The return value should be a list of user login names to "
- + "be used as choices. Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "be used as choices. Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
index b8a54f4f4c..1578af26db 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultmultivalueprovider/ScriptingDefaultMultiValue.java
@@ -17,7 +17,7 @@ public class ScriptingDefaultMultiValue implements DefaultMultiValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return list of user login name. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
index cefabf061c..117b4bb1a5 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/userchoiceinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return login name of an user. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/inputspec/workingperiodinput/defaultvalueprovider/ScriptingDefaultValue.java b/server-core/src/main/java/io/onedev/server/model/support/inputspec/workingperiodinput/defaultvalueprovider/ScriptingDefaultValue.java
index 65390ff271..374ece5400 100755
--- a/server-core/src/main/java/io/onedev/server/model/support/inputspec/workingperiodinput/defaultvalueprovider/ScriptingDefaultValue.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/inputspec/workingperiodinput/defaultvalueprovider/ScriptingDefaultValue.java
@@ -15,7 +15,7 @@ public class ScriptingDefaultValue implements DefaultValueProvider {
private String scriptName;
@Editable(description="Groovy script to be evaluated. It should return a <i>Integer</i> value. "
- + "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
+ + "Check <a href='https://docs.onedev.io/appendix/scripting' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
diff --git a/server-core/src/main/java/io/onedev/server/model/support/issue/field/spec/FieldSpec.java b/server-core/src/main/java/io/onedev/server/model/support/issue/field/spec/FieldSpec.java
index db6c61111b..f2d7065f24 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/issue/field/spec/FieldSpec.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/issue/field/spec/FieldSpec.java
@@ -142,7 +142,7 @@ public abstract class FieldSpec extends InputSpec {
@Editable(order=10100, placeholder="All projects", description="Specify applicable projects for above option. "
+ "Multiple projects should be separated by space. Use '**', '*' or '?' for "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty for all projects")
@io.onedev.server.web.editable.annotation.ShowCondition("isPromptUponIssueOpenEnabled")
@Patterns(suggester="suggestProjects", path=true)
diff --git a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BranchUpdateTrigger.java b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BranchUpdateTrigger.java
index 19ee00c09f..7282cbccf5 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BranchUpdateTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BranchUpdateTrigger.java
@@ -24,7 +24,7 @@ public class BranchUpdateTrigger extends TransitionTrigger {
}
@Editable(order=200, name="Applicable Branches", placeholder="Any branch", description="Optionally specify space-separated branches "
- + "applicable for this trigger. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "applicable for this trigger. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all")
@Patterns(suggester = "suggestBranches", path=true)
public String getBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BuildSuccessfulTrigger.java b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BuildSuccessfulTrigger.java
index 22c832f107..564349665b 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BuildSuccessfulTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/BuildSuccessfulTrigger.java
@@ -40,7 +40,7 @@ public class BuildSuccessfulTrigger extends TransitionTrigger {
}
@Editable(order=200, name="Applicable Branches", placeholder="Any branch", description="Optionally specify space-separated branches "
- + "applicable for this trigger. Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "applicable for this trigger. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all")
@Patterns(suggester = "suggestBranches", path=true)
public String getBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/PullRequestTrigger.java b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/PullRequestTrigger.java
index 6f765aca0b..9b465a93c1 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/PullRequestTrigger.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/issue/transitiontrigger/PullRequestTrigger.java
@@ -26,7 +26,7 @@ public abstract class PullRequestTrigger extends TransitionTrigger {
@Editable(name="Target Branches", order=100, placeholder="Any branch", description="Optionally specify "
+ "space-separated target branches of the pull requests to check. Use '**', '*' or '?' for "
- + "<a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. "
+ + "<a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. "
+ "Prefix with '-' to exclude. Leave empty to match all branches")
@Patterns(suggester = "suggestBranches", path=true)
public String getBranches() {
diff --git a/server-core/src/main/java/io/onedev/server/util/interpolative/VariableInterpolator.java b/server-core/src/main/java/io/onedev/server/util/interpolative/VariableInterpolator.java
index c4d1cdc809..9decb43327 100644
--- a/server-core/src/main/java/io/onedev/server/util/interpolative/VariableInterpolator.java
+++ b/server-core/src/main/java/io/onedev/server/util/interpolative/VariableInterpolator.java
@@ -30,7 +30,7 @@ import io.onedev.server.web.editable.EditableStringTransformer;
public class VariableInterpolator {
- public static final String HELP = "<b>Tips: </b> Type <tt>@</tt> to <a href='$docRoot/pages/job-variables.md' target='_blank' tabindex='-1'>insert variable</a>. "
+ public static final String HELP = "<b>Tips: </b> Type <tt>@</tt> to <a href='https://docs.onedev.io/appendix/job-variables' target='_blank' tabindex='-1'>insert variable</a>. "
+ "Use <tt>@@</tt> for literal <tt>@</tt>";
public static final String PREFIX_PARAM = "param:";
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/BuildQueryBehavior.java b/server-core/src/main/java/io/onedev/server/web/behavior/BuildQueryBehavior.java
index ce7ca7227b..b8ea512ab6 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/BuildQueryBehavior.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/BuildQueryBehavior.java
@@ -216,7 +216,7 @@ public class BuildQueryBehavior extends ANTLRAssistBehavior {
if (!fieldElements.isEmpty()) {
String fieldName = BuildQuery.getValue(fieldElements.get(0).getMatchedText());
if (fieldName.equals(Build.NAME_PROJECT)) {
- hints.add("Use '**', '*' or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
} else if (fieldName.equals(Build.NAME_VERSION) || fieldName.equals(Build.NAME_JOB)) {
hints.add("Use '*' for wildcard match");
hints.add("Use '\\' to escape quotes");
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/IssueQueryBehavior.java b/server-core/src/main/java/io/onedev/server/web/behavior/IssueQueryBehavior.java
index 4a2067c1bc..6952a8357d 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/IssueQueryBehavior.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/IssueQueryBehavior.java
@@ -283,7 +283,7 @@ public class IssueQueryBehavior extends ANTLRAssistBehavior {
if (!fieldElements.isEmpty()) {
String fieldName = ProjectQuery.getValue(fieldElements.get(0).getMatchedText());
if (fieldName.equals(Issue.NAME_PROJECT)) {
- hints.add("Use '**', '*' or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
} else if (fieldName.equals(Issue.NAME_TITLE)
|| fieldName.equals(Issue.NAME_DESCRIPTION)
|| fieldName.equals(Issue.NAME_COMMENT)
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/JobAuthorizationBehavior.java b/server-core/src/main/java/io/onedev/server/web/behavior/JobAuthorizationBehavior.java
index f08bc29ced..b5fb8e1238 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/JobAuthorizationBehavior.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/JobAuthorizationBehavior.java
@@ -17,7 +17,6 @@ import io.onedev.commons.codeassist.parser.Element;
import io.onedev.commons.codeassist.parser.ParseExpect;
import io.onedev.commons.codeassist.parser.TerminalExpect;
import io.onedev.commons.utils.ExplicitException;
-import io.onedev.server.OneDev;
import io.onedev.server.job.authorization.JobAuthorization;
import io.onedev.server.job.authorization.JobAuthorizationLexer;
import io.onedev.server.job.authorization.JobAuthorizationParser;
@@ -98,7 +97,7 @@ public class JobAuthorizationBehavior extends ANTLRAssistBehavior {
if (terminalExpect.getElementSpec() instanceof LexerRuleRefElementSpec) {
LexerRuleRefElementSpec spec = (LexerRuleRefElementSpec) terminalExpect.getElementSpec();
if ("criteriaValue".equals(spec.getLabel())) {
- hints.add("Use '**', '*' or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
}
}
return hints;
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/ProjectQueryBehavior.java b/server-core/src/main/java/io/onedev/server/web/behavior/ProjectQueryBehavior.java
index 37c1e268fd..eed5bf94ac 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/ProjectQueryBehavior.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/ProjectQueryBehavior.java
@@ -170,14 +170,14 @@ public class ProjectQueryBehavior extends ANTLRAssistBehavior {
hints.add("Use '*' for wildcard match");
hints.add("Use '\\' to escape quotes");
} else if (fieldName.equals(Project.NAME_PATH)) {
- hints.add("Use '**', '*' or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
}
} else {
Element operatorElement = terminalExpect.getState()
.findMatchedElementsByLabel("operator", true).iterator().next();
int type = operatorElement.getMatchedTokens().iterator().next().getType();
if (type == ProjectQueryLexer.ForksOf || type == ProjectQueryLexer.ChildrenOf)
- hints.add("Use '**', '*' or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
else
hints.add("Use '\\' to escape quotes");
}
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/PullRequestQueryBehavior.java b/server-core/src/main/java/io/onedev/server/web/behavior/PullRequestQueryBehavior.java
index e1efe1b071..c608d6055d 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/PullRequestQueryBehavior.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/PullRequestQueryBehavior.java
@@ -1,6 +1,18 @@
package io.onedev.server.web.behavior;
-import static io.onedev.server.model.PullRequest.NAME_NUMBER;
+import static io.onedev.server.model.AbstractEntity.NAME_NUMBER;
+import static io.onedev.server.search.entity.EntityQuery.getValue;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQuery.checkField;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQuery.getOperator;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQuery.getRuleName;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.ApprovedByMe;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.AssignedToMe;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.IncludesCommit;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.IncludesIssue;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.OrderBy;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.RequestedForChangesByMe;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.SubmittedByMe;
+import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.ToBeReviewedByMe;
import java.util.ArrayList;
import java.util.List;
@@ -19,13 +31,10 @@ import io.onedev.commons.codeassist.parser.Element;
import io.onedev.commons.codeassist.parser.ParseExpect;
import io.onedev.commons.codeassist.parser.TerminalExpect;
import io.onedev.commons.utils.ExplicitException;
-import io.onedev.server.OneDev;
import io.onedev.server.model.Project;
import io.onedev.server.model.PullRequest;
import io.onedev.server.model.support.pullrequest.MergeStrategy;
import io.onedev.server.search.entity.project.ProjectQuery;
-import static io.onedev.server.search.entity.pullrequest.PullRequestQuery.*;
-import static io.onedev.server.search.entity.pullrequest.PullRequestQueryLexer.*;
import io.onedev.server.search.entity.pullrequest.PullRequestQueryParser;
import io.onedev.server.util.DateUtils;
import io.onedev.server.web.behavior.inputassist.ANTLRAssistBehavior;
@@ -187,7 +196,7 @@ public class PullRequestQueryBehavior extends ANTLRAssistBehavior {
String fieldName = ProjectQuery.getValue(fieldElements.get(0).getMatchedText());
if (fieldName.equals(PullRequest.NAME_TARGET_PROJECT)
|| fieldName.equals(PullRequest.NAME_TARGET_BRANCH)) {
- hints.add("Use '**', '*', or '?' for <a href='" + OneDev.getInstance().getDocRoot() + "/pages/path-wildcard.md' target='_blank'>path wildcard match</a>");
+ hints.add("Use '**', '*', or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>");
} else if (fieldName.equals(PullRequest.NAME_TITLE)
|| fieldName.equals(PullRequest.NAME_DESCRIPTION)
|| fieldName.equals(PullRequest.NAME_COMMENT)
diff --git a/server-core/src/main/java/io/onedev/server/web/behavior/inputassist/AssistPanel.java b/server-core/src/main/java/io/onedev/server/web/behavior/inputassist/AssistPanel.java
index 1a018a0b75..db21681d87 100644
--- a/server-core/src/main/java/io/onedev/server/web/behavior/inputassist/AssistPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/behavior/inputassist/AssistPanel.java
@@ -1,7 +1,6 @@
package io.onedev.server.web.behavior.inputassist;
import java.util.List;
-import java.util.stream.Collectors;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.wicket.Component;
@@ -14,7 +13,6 @@ import org.apache.wicket.markup.repeater.RepeatingView;
import io.onedev.commons.codeassist.InputCompletion;
import io.onedev.commons.utils.LinearRange;
-import io.onedev.server.OneDev;
import io.onedev.server.web.behavior.infinitescroll.InfiniteScrollBehavior;
@SuppressWarnings("serial")
@@ -32,9 +30,7 @@ abstract class AssistPanel extends Panel {
super(id);
this.input = input;
this.suggestions = suggestions;
- this.hints = hints.stream()
- .map(it->it.replace("$docRoot", OneDev.getInstance().getDocRoot()))
- .collect(Collectors.toList());
+ this.hints = hints;
}
@Override
diff --git a/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/BlobTextDiffPanel.java b/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/BlobTextDiffPanel.java
index 8af490471c..8f00f11796 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/BlobTextDiffPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/BlobTextDiffPanel.java
@@ -504,7 +504,7 @@ public class BlobTextDiffPanel extends Panel {
callback, blameMessageBehavior.getCallback(),
convertToJson(markRange), convertToJson(openCommentInfo),
convertToJson(annotationInfoModel.getObject()),
- commentContainerId, OneDev.getInstance().getDocRoot());
+ commentContainerId);
response.render(OnDomReadyHeaderItem.forScript(script));
diff --git a/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/blob-text-diff.js b/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/blob-text-diff.js
index 545ac22f76..c7a2fa715f 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/blob-text-diff.js
+++ b/server-core/src/main/java/io/onedev/server/web/component/diff/blob/text/blob-text-diff.js
@@ -1,7 +1,7 @@
onedev.server.blobTextDiff = {
symbolClasses: ".cm-property, .cm-variable, .cm-variable-2, .cm-variable-3, .cm-def, .cm-meta, .cm-string, .cm-tag, .cm-attribute, cm-builtin, cm-qualifier",
onDomReady: function(containerId, symbolTooltipId, oldRev, newRev, callback, blameMessageCallback,
- markRange, openComment, annotationInfo, commentContainerId, doclink) {
+ markRange, openComment, annotationInfo, commentContainerId) {
var $container = $("#" + containerId);
$container.data("commentContainerId", commentContainerId);
$container.data("callback", callback);
@@ -325,7 +325,7 @@ onedev.server.blobTextDiff = {
function showInvalidSelection() {
var $content = $("<div></div>");
$content.append(`<a class='invalid'><svg class='icon'><use xlink:href='${onedev.server.icons}#warning'/></svg> Invalid selection, click for details</a>`);
- $content.children("a").attr("href", doclink + "/pages/diff-selection.md").attr("target", "_blank");
+ $content.children("a").attr("href", "https://docs.onedev.io/appendix/diff-selection").attr("target", "_blank");
return {
position: position,
content: $content
diff --git a/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java b/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java
index 45400c607c..03bbcce468 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java
@@ -622,7 +622,7 @@ public abstract class RevisionDiffPanel extends Panel {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Path containing spaces or starting with dash needs to be quoted",
- "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
+ "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
);
}
diff --git a/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.html b/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.html
index 1e3528e932..bc899e8ee5 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.html
@@ -42,7 +42,7 @@
<div class="emojis"></div>
<div class="help text-muted font-size-sm">
<wicket:svg href="bulb" class="icon icon-sm"></wicket:svg> <a href="https://guides.github.com/features/mastering-markdown/" target="_blank">GitHub flavored markdown</a> is accepted,
- with <a wicket:id="syntaxHelp" target="_blank">mermaid and katex support</a>.
+ with <a href="https://docs.onedev.io/appendix/markdown-syntax" target="_blank">mermaid and katex support</a>.
<span wicket:id="canAttachFile">You may also drop file/image to the input box, or paste image from clipboard</span>
</div>
</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java b/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
index e15db35314..1f7b080a46 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
@@ -309,8 +309,6 @@ public class MarkdownEditor extends FormComponentPanel<String> {
container.add(new LazyResourceLoader("lazyResourceLoader", Model.of((String)null)));
}
- container.add(new WebMarkupContainer("syntaxHelp")
- .add(AttributeAppender.append("href", OneDev.getInstance().getDocRoot() + "/pages/markdown-syntax.md")));
container.add(new WebMarkupContainer("canAttachFile").setVisible(getAttachmentSupport()!=null));
container.add(actionBehavior = new AbstractPostAjaxBehavior() {
diff --git a/server-core/src/main/java/io/onedev/server/web/editable/EditableUtils.java b/server-core/src/main/java/io/onedev/server/web/editable/EditableUtils.java
index ccfdddf948..25210e759e 100644
--- a/server-core/src/main/java/io/onedev/server/web/editable/EditableUtils.java
+++ b/server-core/src/main/java/io/onedev/server/web/editable/EditableUtils.java
@@ -6,8 +6,6 @@ import java.util.List;
import javax.annotation.Nullable;
-import io.onedev.commons.utils.StringUtils;
-import io.onedev.server.OneDev;
import io.onedev.server.model.Project;
import io.onedev.server.util.BeanUtils;
import io.onedev.server.util.DateUtils;
@@ -97,7 +95,7 @@ public class EditableUtils {
} else {
description = VariableInterpolator.HELP;
}
- return StringUtils.replace(description, "$docRoot", OneDev.getInstance().getDocRoot());
+ return description;
} else if (element.getAnnotation(WorkingPeriod.class) != null) {
String description = getDescription(element, editable);
if (description.length() != 0) {
@@ -107,11 +105,11 @@ public class EditableUtils {
} else {
description = DateUtils.WORKING_PERIOD_HELP;
}
- return StringUtils.replace(description, "$docRoot", OneDev.getInstance().getDocRoot());
+ return description;
} else {
String description = getDescription(element, editable);
if (description.length() != 0)
- return StringUtils.replace(description, "$docRoot", OneDev.getInstance().getDocRoot());
+ return description;
else
return null;
}
diff --git a/server-core/src/main/java/io/onedev/server/web/editable/InterpolativePatternsEditSupport.java b/server-core/src/main/java/io/onedev/server/web/editable/InterpolativePatternsEditSupport.java
index 7c36fdbb00..1bba6da6fb 100644
--- a/server-core/src/main/java/io/onedev/server/web/editable/InterpolativePatternsEditSupport.java
+++ b/server-core/src/main/java/io/onedev/server/web/editable/InterpolativePatternsEditSupport.java
@@ -67,7 +67,7 @@ public class InterpolativePatternsEditSupport implements EditSupport {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Pattern containing spaces or starting with dash needs to be quoted",
- patterns.path()? "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude": "Use '*' or '?' for wildcard match. Prefix with '-' to exclude");
+ patterns.path()? "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude": "Use '*' or '?' for wildcard match. Prefix with '-' to exclude");
}
});
diff --git a/server-core/src/main/java/io/onedev/server/web/editable/PatternsEditSupport.java b/server-core/src/main/java/io/onedev/server/web/editable/PatternsEditSupport.java
index 12a94733f9..77b7d2e431 100644
--- a/server-core/src/main/java/io/onedev/server/web/editable/PatternsEditSupport.java
+++ b/server-core/src/main/java/io/onedev/server/web/editable/PatternsEditSupport.java
@@ -52,7 +52,7 @@ public class PatternsEditSupport implements EditSupport {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Pattern containing spaces or starting with dash needs to be quoted",
- patterns.path()? "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude": "Use '*' or '?' for wildcard match. Prefix with '-' to exclude"
+ patterns.path()? "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude": "Use '*' or '?' for wildcard match. Prefix with '-' to exclude"
);
}
diff --git a/server-core/src/main/java/io/onedev/server/web/editable/polymorphic/PolymorphicPropertyEditor.java b/server-core/src/main/java/io/onedev/server/web/editable/polymorphic/PolymorphicPropertyEditor.java
index ac514d80d2..f3b6fc727a 100644
--- a/server-core/src/main/java/io/onedev/server/web/editable/polymorphic/PolymorphicPropertyEditor.java
+++ b/server-core/src/main/java/io/onedev/server/web/editable/polymorphic/PolymorphicPropertyEditor.java
@@ -26,8 +26,6 @@ import com.google.common.base.Preconditions;
import io.onedev.commons.loader.AppLoader;
import io.onedev.commons.loader.ImplementationRegistry;
-import io.onedev.commons.utils.StringUtils;
-import io.onedev.server.OneDev;
import io.onedev.server.util.ComponentContext;
import io.onedev.server.util.Path;
import io.onedev.server.util.PathNode;
@@ -196,11 +194,7 @@ public class PolymorphicPropertyEditor extends PropertyEditor<Serializable> {
Component beanEditor = PolymorphicPropertyEditor.this.get(BEAN_EDITOR_ID);
if (beanEditor instanceof BeanEditor) {
Class<?> beanClass = ((BeanEditor) beanEditor).getDescriptor().getBeanClass();
- String description = EditableUtils.getDescription(beanClass);
- if (description != null)
- return StringUtils.replace(description, "$docRoot", OneDev.getInstance().getDocRoot());
- else
- return null;
+ return EditableUtils.getDescription(beanClass);
} else {
return null;
}
diff --git a/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.html b/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.html
index 36156f74e7..00b2d9fce8 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.html
@@ -33,7 +33,7 @@
upon server upgrade
</li>
<li>
- Check <a wicket:id="help" target="_blank">agent management</a> for details, including instructions on how to run agent as service
+ Check <a href="https://docs.onedev.io/administration-guide/agent-management" target="_blank">agent management</a> for details, including instructions on how to run agent as service
</li>
</ul>
</wicket:fragment>
@@ -52,7 +52,7 @@
upon server upgrade
</li>
<li>
- Check <a wicket:id="help" target="_blank">agent management</a> for details, including list of supported environment variables
+ Check <a href="https://docs.onedev.io/administration-guide/agent-management" target="_blank">agent management</a> for details, including list of supported environment variables
</li>
</ul>
</wicket:fragment>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.java b/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.java
index 5575f0520b..44043e4bed 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/admin/buildsetting/agent/AddAgentPanel.java
@@ -77,7 +77,6 @@ class AddAgentPanel extends Panel {
Fragment commandFragment = new Fragment("command", "dockerCommandFrag", AddAgentPanel.this);
commandFragment.add(new Label("command", builder.toString()));
commandFragment.add(new CopyToClipboardLink("copy", Model.of(builder.toString())));
- commandFragment.add(new ExternalLink("help", OneDev.getInstance().getDocRoot() + "/pages/agent-management.md"));
fragment.replace(commandFragment);
target.add(fragment);
}
@@ -91,7 +90,6 @@ class AddAgentPanel extends Panel {
private Component newBareMetalInstructions() {
Fragment fragment = new Fragment("instructions", "bareMetalInstructionsFrag", this);
fragment.add(new ExternalLink("agent", "/~downloads/agent.zip"));
- fragment.add(new ExternalLink("help", OneDev.getInstance().getDocRoot() + "/pages/agent-management.md"));
fragment.setOutputMarkupId(true);
return fragment;
}
diff --git a/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.html b/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.html
index b35e58e4dc..2976bfacfe 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.html
@@ -21,7 +21,7 @@
<wicket:svg href="question-o" class="icon"></wicket:svg>
</a>
<div class="dropdown-menu">
- <a wicket:id="docLink" class="dropdown-item" target="_blank">Documentation</a>
+ <a href="https://docs.onedev.io" class="dropdown-item" target="_blank">Documentation</a>
<a href="https://code.onedev.io/onedev/server/~issues?query=%22State%22+is+%22Open%22" class="dropdown-item" target="_blank">Support &amp; Bug Report</a>
<a href="/~help/api" class="dropdown-item" target="_blank">RESTful API</a>
<a wicket:id="incompatibilities" class="dropdown-item">Incompatibilities</a>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.java b/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.java
index 95e09cdc52..75d0016353 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/layout/LayoutPage.java
@@ -353,7 +353,6 @@ public abstract class LayoutPage extends BasePage {
Plugin product = AppLoader.getProduct();
sidebar.add(new ExternalLink("productVersion", "https://code.onedev.io/onedev/server")
.setBody(Model.of("OneDev " + product.getVersion())));
- sidebar.add(new ExternalLink("docLink", OneDev.getInstance().getDocRoot() + "/"));
sidebar.add(new BookmarkablePageLink<Void>("incompatibilities", IncompatibilitiesPage.class));
WebMarkupContainer topbar = new WebMarkupContainer("topbar");
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
index 965a4ccf49..42006e82b5 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.html
@@ -1,6 +1,6 @@
<wicket:extend>
<div class="changes">
<div wicket:id="commits"></div>
- <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mr-1 mt-n1"/> This page lists changes since previous build on <a wicket:id="buildStreamHelpUrl" class="link-primary" target="_blank">same stream</a></div>
+ <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mr-1 mt-n1"/> This page lists changes since previous build on <a href="https://docs.onedev.io/concepts#build-stream" class="link-primary" target="_blank">same stream</a></div>
</div>
</wicket:extend>
\ No newline at end of file
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.java
index c3303135bf..0684fee780 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/changes/BuildChangesPage.java
@@ -7,8 +7,6 @@ import java.util.List;
import javax.annotation.Nullable;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.mapper.parameter.PageParameters;
@@ -92,15 +90,6 @@ public class BuildChangesPage extends BuildDetailPage {
});
- add(new WebMarkupContainer("buildStreamHelpUrl") {
-
- @Override
- protected void onComponentTag(ComponentTag tag) {
- super.onComponentTag(tag);
- tag.put("href", OneDev.getInstance().getDocRoot() + "/pages/concepts.md#build-stream");
- }
-
- });
}
@Override
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.html b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.html
index 5904cbdafa..90ec12a127 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.html
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.html
@@ -2,7 +2,7 @@
<div wicket:id="content" class="issues"></div>
<wicket:fragment wicket:id="hasPreviousBuildFrag">
<div wicket:id="issues"></div>
- <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mt-n1 mr-1"/> This page lists fixed issues since previous build on <a wicket:id="buildStreamHelpUrl" class="link-primary" target="_blank">same stream</a></div>
+ <div class="font-size-sm text-muted mt-4"><wicket:svg href="bulb" class="icon mt-n1 mr-1"/> This page lists fixed issues since previous build on <a href="https://docs.onedev.io/concepts#build-stream" class="link-primary" target="_blank">same stream</a></div>
</wicket:fragment>
<wicket:fragment wicket:id="noPreviousBuildFrag">
<div class="alert alert-light-warning">Fixed issues not available for first build of a job</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.java b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.java
index c44bbc3fe7..edbd50fe6a 100644
--- a/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.java
+++ b/server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/issues/FixedIssuesPage.java
@@ -6,14 +6,11 @@ import java.util.ArrayList;
import javax.annotation.Nullable;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import io.onedev.server.OneDev;
import io.onedev.server.model.Build;
import io.onedev.server.model.Project;
import io.onedev.server.search.entity.issue.FixedInBuildCriteria;
@@ -99,16 +96,6 @@ public class FixedIssuesPage extends BuildDetailPage {
});
- fragment.add(new WebMarkupContainer("buildStreamHelpUrl") {
-
- @Override
- protected void onComponentTag(ComponentTag tag) {
- super.onComponentTag(tag);
- tag.put("href", OneDev.getInstance().getDocRoot() + "/pages/concepts.md#build-stream");
- }
-
- });
-
add(fragment);
} else {
add(new Fragment("content", "noPreviousBuildFrag", this));
diff --git a/server-core/src/main/java/io/onedev/server/web/resource/AgentResource.java b/server-core/src/main/java/io/onedev/server/web/resource/AgentResource.java
index 9c2f8ae78b..e2660b2e43 100644
--- a/server-core/src/main/java/io/onedev/server/web/resource/AgentResource.java
+++ b/server-core/src/main/java/io/onedev/server/web/resource/AgentResource.java
@@ -70,7 +70,7 @@ public class AgentResource extends AbstractResource {
try (OutputStream os = new FileOutputStream(new File(agentDir, "agent/conf/agent.properties"))) {
String comment = "For a list of supported agent properties, please visit:\n"
- + OneDev.getInstance().getDocRoot() + "/pages/agent-management.md#agent-propertiesenvironments";
+ + "https://docs.onedev.io/administration-guide/agent-management#agent-propertiesenvironments";
props.store(os, comment);
}
diff --git a/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishCheckstyleReportStep.java b/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishCheckstyleReportStep.java
index 5a44471e6c..6b3c7c81a7 100644
--- a/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishCheckstyleReportStep.java
+++ b/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishCheckstyleReportStep.java
@@ -40,7 +40,7 @@ public class PublishCheckstyleReportStep extends PublishProblemReportStep {
public static final String HH = "hh";
- @Editable(order=100, description="Specify checkstyle result xml file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify checkstyle result xml file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/checkstyle-result.xml</tt>. "
+ "Refer to <a href='https://checkstyle.org/'>checkstyle documentation</a> "
+ "on how to generate the result xml file. Use * or ? for pattern match")
diff --git a/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishESLintReportStep.java b/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishESLintReportStep.java
index dce1c29c0e..254a318785 100644
--- a/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishESLintReportStep.java
+++ b/server-plugin/server-plugin-report-checkstyle/src/main/java/io/onedev/server/plugin/report/checkstyle/PublishESLintReportStep.java
@@ -12,7 +12,7 @@ public class PublishESLintReportStep extends PublishCheckstyleReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify ESLint report file in checkstyle format under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>. "
+ @Editable(order=100, description="Specify ESLint report file in checkstyle format under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. "
+ "This file can be generated with ESLint option <tt>'-f checkstyle'</tt> and <tt>'-o'</tt>. "
+ "Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
diff --git a/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishCloverReportStep.java b/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishCloverReportStep.java
index 6fcee35918..151a0a54eb 100644
--- a/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishCloverReportStep.java
+++ b/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishCloverReportStep.java
@@ -38,7 +38,7 @@ public class PublishCloverReportStep extends PublishCoverageReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify clover coverage xml report file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify clover coverage xml report file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/site/clover/clover.xml</tt>. "
+ "Refer to <a href='https://openclover.org/documentation'>OpenClover documentation</a> "
+ "on how to generate clover xml file. Use * or ? for pattern match")
diff --git a/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishJestCoverageReportStep.java b/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishJestCoverageReportStep.java
index 9608e513f3..c7531b0cf8 100644
--- a/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishJestCoverageReportStep.java
+++ b/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/PublishJestCoverageReportStep.java
@@ -12,7 +12,7 @@ public class PublishJestCoverageReportStep extends PublishCloverReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify Jest coverage report file in clover format under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify Jest coverage report file in clover format under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance <tt>coverage/clover.xml</tt>. This file can be generated with Jest option <tt>'--coverage'</tt>. "
+ "Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
diff --git a/server-plugin/server-plugin-report-cpd/src/main/java/io/onedev/server/plugin/report/cpd/PublishCPDReportStep.java b/server-plugin/server-plugin-report-cpd/src/main/java/io/onedev/server/plugin/report/cpd/PublishCPDReportStep.java
index 0de90acf51..a76a9ee5a1 100644
--- a/server-plugin/server-plugin-report-cpd/src/main/java/io/onedev/server/plugin/report/cpd/PublishCPDReportStep.java
+++ b/server-plugin/server-plugin-report-cpd/src/main/java/io/onedev/server/plugin/report/cpd/PublishCPDReportStep.java
@@ -44,7 +44,7 @@ public class PublishCPDReportStep extends PublishProblemReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify CPD result xml file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify CPD result xml file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/cpd.xml</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-jacoco/src/main/java/io/onedev/server/plugin/report/jacoco/PublishJacocoReportStep.java b/server-plugin/server-plugin-report-jacoco/src/main/java/io/onedev/server/plugin/report/jacoco/PublishJacocoReportStep.java
index c82acf3b20..ac99e62fb0 100644
--- a/server-plugin/server-plugin-report-jacoco/src/main/java/io/onedev/server/plugin/report/jacoco/PublishJacocoReportStep.java
+++ b/server-plugin/server-plugin-report-jacoco/src/main/java/io/onedev/server/plugin/report/jacoco/PublishJacocoReportStep.java
@@ -40,7 +40,7 @@ public class PublishJacocoReportStep extends PublishCoverageReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify JaCoCo coverage xml report file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify JaCoCo coverage xml report file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/site/jacoco/jacoco.xml</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-jest/src/main/java/io/onedev/server/plugin/report/jest/PublishJestReportStep.java b/server-plugin/server-plugin-report-jest/src/main/java/io/onedev/server/plugin/report/jest/PublishJestReportStep.java
index 42ae371513..01db65c548 100644
--- a/server-plugin/server-plugin-report-jest/src/main/java/io/onedev/server/plugin/report/jest/PublishJestReportStep.java
+++ b/server-plugin/server-plugin-report-jest/src/main/java/io/onedev/server/plugin/report/jest/PublishJestReportStep.java
@@ -29,7 +29,7 @@ public class PublishJestReportStep extends PublishUnitTestReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify Jest test result file in json format under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>. "
+ @Editable(order=100, description="Specify Jest test result file in json format under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>. "
+ "This file can be generated via Jest option <tt>'--json'</tt> and <tt>'--outputFile'</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-junit/src/main/java/io/onedev/server/plugin/report/junit/PublishJUnitReportStep.java b/server-plugin/server-plugin-report-junit/src/main/java/io/onedev/server/plugin/report/junit/PublishJUnitReportStep.java
index 693097a2e9..5dacdb226e 100644
--- a/server-plugin/server-plugin-report-junit/src/main/java/io/onedev/server/plugin/report/junit/PublishJUnitReportStep.java
+++ b/server-plugin/server-plugin-report-junit/src/main/java/io/onedev/server/plugin/report/junit/PublishJUnitReportStep.java
@@ -32,7 +32,7 @@ public class PublishJUnitReportStep extends PublishUnitTestReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify JUnit test result file in XML format under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify JUnit test result file in XML format under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance <tt>target/surefire-reports/TEST-*.xml</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-markdown/src/main/java/io/onedev/server/plugin/report/markdown/PublishMarkdownReportStep.java b/server-plugin/server-plugin-report-markdown/src/main/java/io/onedev/server/plugin/report/markdown/PublishMarkdownReportStep.java
index 1df6b645d4..e40ef54fe2 100644
--- a/server-plugin/server-plugin-report-markdown/src/main/java/io/onedev/server/plugin/report/markdown/PublishMarkdownReportStep.java
+++ b/server-plugin/server-plugin-report-markdown/src/main/java/io/onedev/server/plugin/report/markdown/PublishMarkdownReportStep.java
@@ -30,7 +30,7 @@ public class PublishMarkdownReportStep extends PublishReportStep {
private String startPage;
- @Editable(order=1100, description="Specify start page of the report under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, for instance: <tt>manual/index.md</tt>")
+ @Editable(order=1100, description="Specify start page of the report under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, for instance: <tt>manual/index.md</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getStartPage() {
diff --git a/server-plugin/server-plugin-report-pmd/src/main/java/io/onedev/server/plugin/report/pmd/PublishPMDReportStep.java b/server-plugin/server-plugin-report-pmd/src/main/java/io/onedev/server/plugin/report/pmd/PublishPMDReportStep.java
index 20855ad921..02552891ed 100644
--- a/server-plugin/server-plugin-report-pmd/src/main/java/io/onedev/server/plugin/report/pmd/PublishPMDReportStep.java
+++ b/server-plugin/server-plugin-report-pmd/src/main/java/io/onedev/server/plugin/report/pmd/PublishPMDReportStep.java
@@ -38,7 +38,7 @@ public class PublishPMDReportStep extends PublishProblemReportStep {
private static final int TAB_WIDTH = 8;
- @Editable(order=100, description="Specify PMD result xml file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify PMD result xml file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/pmd.xml</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-spotbugs/src/main/java/io/onedev/server/plugin/report/spotbugs/PublishSpotBugsReportStep.java b/server-plugin/server-plugin-report-spotbugs/src/main/java/io/onedev/server/plugin/report/spotbugs/PublishSpotBugsReportStep.java
index c0167bb4a3..2ffb849a36 100644
--- a/server-plugin/server-plugin-report-spotbugs/src/main/java/io/onedev/server/plugin/report/spotbugs/PublishSpotBugsReportStep.java
+++ b/server-plugin/server-plugin-report-spotbugs/src/main/java/io/onedev/server/plugin/report/spotbugs/PublishSpotBugsReportStep.java
@@ -41,7 +41,7 @@ public class PublishSpotBugsReportStep extends PublishProblemReportStep {
private static final long serialVersionUID = 1L;
- @Editable(order=100, description="Specify SpotBugs result xml file under <a href='$docRoot/pages/concepts.md#job-workspace'>job workspace</a>, "
+ @Editable(order=100, description="Specify SpotBugs result xml file under <a href='https://docs.onedev.io/concepts#job-workspace'>job workspace</a>, "
+ "for instance, <tt>target/spotbugsXml.xml</tt>. Use * or ? for pattern match")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(path=true)
diff --git a/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestCasesPage.java b/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestCasesPage.java
index eee9f6b00d..86521e9a77 100644
--- a/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestCasesPage.java
+++ b/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestCasesPage.java
@@ -155,7 +155,7 @@ public class UnitTestCasesPage extends UnitTestReportPage {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Path containing spaces or starting with dash needs to be quoted",
- "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
+ "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
);
}
@@ -232,7 +232,7 @@ public class UnitTestCasesPage extends UnitTestReportPage {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Path containing spaces or starting with dash needs to be quoted",
- "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
+ "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
);
}
diff --git a/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestSuitesPage.java b/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestSuitesPage.java
index 7d82e6d431..b9451031ee 100644
--- a/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestSuitesPage.java
+++ b/server-plugin/server-plugin-report-unittest/src/main/java/io/onedev/server/plugin/report/unittest/UnitTestSuitesPage.java
@@ -146,7 +146,7 @@ public class UnitTestSuitesPage extends UnitTestReportPage {
protected List<String> getHints(TerminalExpect terminalExpect) {
return Lists.newArrayList(
"Path containing spaces or starting with dash needs to be quoted",
- "Use '**', '*' or '?' for <a href='$docRoot/pages/path-wildcard.md' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
+ "Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. Prefix with '-' to exclude"
);
}
diff --git a/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/GitHubConnector.java b/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/GitHubConnector.java
index 2b122fd92e..aa7070c84f 100644
--- a/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/GitHubConnector.java
+++ b/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/GitHubConnector.java
@@ -23,7 +23,7 @@ import io.onedev.server.model.support.administration.sso.SsoAuthenticated;
import io.onedev.server.web.editable.annotation.Editable;
import net.minidev.json.JSONObject;
-@Editable(name="OpenID (GitHub)", order=100, description="Refer to this <a href='$docRoot/pages/github-sso.md' target='_blank'>usage scenario</a> for an example setup")
+@Editable(name="OpenID (GitHub)", order=100, description="Refer to this <a href='https://docs.onedev.io/tutorials/security/sso-with-github/' target='_blank'>tutorial</a> for an example setup")
public class GitHubConnector extends OpenIdConnector {
private static final long serialVersionUID = 1L;
diff --git a/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/OpenIdConnector.java b/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/OpenIdConnector.java
index a309682806..fea7ebfcc3 100644
--- a/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/OpenIdConnector.java
+++ b/server-plugin/server-plugin-sso-openid/src/main/java/io/onedev/server/plugin/sso/openid/OpenIdConnector.java
@@ -66,7 +66,7 @@ import io.onedev.server.web.page.admin.ssosetting.SsoProcessPage;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
-@Editable(name="OpenID", order=10000, description="Refer to this <a href='$docRoot/pages/okta-sso.md' target='_blank'>usage scenario</a> for an example setup")
+@Editable(name="OpenID", order=10000, description="Refer to this <a href='https://docs.onedev.io/tutorials/security/sso-with-okta/' target='_blank'>tutorial</a> for an example setup")
public class OpenIdConnector extends SsoConnector {
private static final long serialVersionUID = 1L;