修复帮助文件找不的问题

This commit is contained in:
yashin 2018-07-10 18:33:33 +08:00
parent 21a51f87df
commit 782497f4d3
9 changed files with 16 additions and 16 deletions

View File

@ -51,7 +51,7 @@ public class GiteeConnectionConfig extends GlobalConfiguration {
@Override @Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException { public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
connections = req.bindJSONToList(GiteeConnection.class, json.get("connections")); connections = req.bindJSONToList(GiteeConnection.class, json.get("connections"));
useAuthenticatedEndpoint = json.getBoolean("useAuthenticatedEndpoint"); // useAuthenticatedEndpoint = json.getBoolean("useAuthenticatedEndpoint");
refreshConnectionMap(); refreshConnectionMap();
save(); save();
return super.configure(req, json); return super.configure(req, json);

View File

@ -154,7 +154,7 @@ public class GiteeMessagePublisher extends MergeRequestNotifier {
@Override @Override
public String getHelpFile() { public String getHelpFile() {
return "/plugin/gitee-plugin/help/help-messagesOnResult.html"; return "/plugin/gitee-jenkins-plugin/help/help-messagesOnResult.html";
} }
} }

View File

@ -154,8 +154,8 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
public static void migrateJobs() throws IOException { public static void migrateJobs() throws IOException {
GiteePushTrigger.DescriptorImpl oldConfig = Trigger.all().get(GiteePushTrigger.DescriptorImpl.class); GiteePushTrigger.DescriptorImpl oldConfig = Trigger.all().get(GiteePushTrigger.DescriptorImpl.class);
if (!oldConfig.jobsMigrated) { if (!oldConfig.jobsMigrated) {
GiteeConnectionConfig gitLabConfig = (GiteeConnectionConfig) Jenkins.getInstance().getDescriptor(GiteeConnectionConfig.class); GiteeConnectionConfig giteeConfig = (GiteeConnectionConfig) Jenkins.getInstance().getDescriptor(GiteeConnectionConfig.class);
gitLabConfig.getConnections().add(new GiteeConnection( giteeConfig.getConnections().add(new GiteeConnection(
oldConfig.giteeHostUrl, oldConfig.giteeHostUrl,
oldConfig.giteeHostUrl, oldConfig.giteeHostUrl,
oldConfig.GiteeApiToken, oldConfig.GiteeApiToken,
@ -164,7 +164,7 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
10, 10,
10)); 10));
String defaultConnectionName = gitLabConfig.getConnections().get(0).getName(); String defaultConnectionName = giteeConfig.getConnections().get(0).getName();
for (AbstractProject<?, ?> project : Jenkins.getInstance().getAllItems(AbstractProject.class)) { for (AbstractProject<?, ?> project : Jenkins.getInstance().getAllItems(AbstractProject.class)) {
GiteePushTrigger trigger = project.getTrigger(GiteePushTrigger.class); GiteePushTrigger trigger = project.getTrigger(GiteePushTrigger.class);
if (trigger != null) { if (trigger != null) {
@ -172,7 +172,7 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
project.save(); project.save();
} }
} }
gitLabConfig.save(); giteeConfig.save();
oldConfig.jobsMigrated = true; oldConfig.jobsMigrated = true;
oldConfig.save(); oldConfig.save();
} }

View File

@ -4,7 +4,7 @@
<f:entry title="${%Gitee.connections}" > <f:entry title="${%Gitee.connections}" >
<f:repeatable var="connection" items="${descriptor.connections}" name="connections"> <f:repeatable var="connection" items="${descriptor.connections}" name="connections">
<table width="100%"> <table width="100%">
<f:entry title="${%Connection.name}" field="name" help="/plugin/gitee-plugin/help/help-gitee-connection.html"> <f:entry title="${%Connection.name}" field="name" help="/plugin/gitee-jenkins-plugin/help/help-gitee-connection.html">
<f:textbox value="${connection.name}"/> <f:textbox value="${connection.name}"/>
<input type="hidden" name="id" value="${connection}"/> <input type="hidden" name="id" value="${connection}"/>
</f:entry> </f:entry>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:entry title="${%Gitee.connection}" field="giteeConnection" help="/plugin/gitee-plugin/help/help-gitee-connection.html"> <f:entry title="${%Gitee.connection}" field="giteeConnection" help="/plugin/gitee-jenkins-plugin/help/help-gitee-connection.html">
<f:select/> <f:select/>
</f:entry> </f:entry>
</j:jelly> </j:jelly>

View File

@ -1,7 +1,7 @@
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:advanced> <f:advanced>
<f:entry title="${%Build name}" field="name" help="/plugin/gitee-plugin/help/help-buildName.html"> <f:entry title="${%Build name}" field="name" help="/plugin/gitee-jenkins-plugin/help/help-buildName.html">
<f:textbox default="jenkins"/> <f:textbox default="jenkins"/>
</f:entry> </f:entry>
<f:entry title="${%Mark unstable builds as success}" field="markUnstableAsSuccess"> <f:entry title="${%Mark unstable builds as success}" field="markUnstableAsSuccess">

View File

@ -1,7 +1,7 @@
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" <j:jelly xmlns:j="jelly:core"
xmlns:f="/lib/form"> xmlns:f="/lib/form">
<f:entry title="${%Enabled.Gitee.Triggers}" help="/plugin/gitee-plugin/help/help-pull-request-refspec.html"> <f:entry title="${%Enabled.Gitee.Triggers}" help="/plugin/gitee-jenkins-plugin/help/help-pull-request-refspec.html">
<table> <table>
<f:entry title="${%Push}" field="triggerOnPush"> <f:entry title="${%Push}" field="triggerOnPush">
<f:checkbox default="true"/> <f:checkbox default="true"/>
@ -40,10 +40,10 @@
<!--<f:section title="">--> <!--<f:section title="">-->
<f:radioBlock name="branchFilterType" value="All" title="${%Allow.all.branches}" <f:radioBlock name="branchFilterType" value="All" title="${%Allow.all.branches}"
checked="${instance.branchFilterType == null || instance.branchFilterType.toString() == 'All'}" checked="${instance.branchFilterType == null || instance.branchFilterType.toString() == 'All'}"
inline="true" help="/plugin/gitee-plugin/help/help-noBranchFiltering.html"/> inline="true" help="/plugin/gitee-jenkins-plugin/help/help-noBranchFiltering.html"/>
<f:radioBlock name="branchFilterType" value="NameBasedFilter" title="${%Filter.branches.by.name}" <f:radioBlock name="branchFilterType" value="NameBasedFilter" title="${%Filter.branches.by.name}"
checked="${instance.branchFilterType.toString() == 'NameBasedFilter'}" inline="true" checked="${instance.branchFilterType.toString() == 'NameBasedFilter'}" inline="true"
help="/plugin/gitee-plugin/help/help-allowedBranches.html"> help="/plugin/gitee-jenkins-plugin/help/help-allowedBranches.html">
<f:entry title="${%Include}"> <f:entry title="${%Include}">
<f:textbox name="includeBranchesSpec" field="includeBranchesSpec" autoCompleteDelimChar=","/> <f:textbox name="includeBranchesSpec" field="includeBranchesSpec" autoCompleteDelimChar=","/>
</f:entry> </f:entry>
@ -54,14 +54,14 @@
<f:radioBlock name="branchFilterType" value="RegexBasedFilter" title="${%Filter.branches.by.regex}" <f:radioBlock name="branchFilterType" value="RegexBasedFilter" title="${%Filter.branches.by.regex}"
checked="${instance.branchFilterType.toString() == 'RegexBasedFilter'}" inline="true" checked="${instance.branchFilterType.toString() == 'RegexBasedFilter'}" inline="true"
help="/plugin/gitee-plugin/help/help-filterBranchesByRegex.html"> help="/plugin/gitee-jenkins-plugin/help/help-filterBranchesByRegex.html">
<f:entry title="${%Target.Branch.Regex}"> <f:entry title="${%Target.Branch.Regex}">
<f:textbox name="targetBranchRegex" field="targetBranchRegex"/> <f:textbox name="targetBranchRegex" field="targetBranchRegex"/>
</f:entry> </f:entry>
</f:radioBlock> </f:radioBlock>
</table> </table>
</f:entry> </f:entry>
<f:entry title="${%Secret.Token}" help="/plugin/gitee-plugin/help/help-secretToken.html"> <f:entry title="${%Secret.Token}" help="/plugin/gitee-jenkins-plugin/help/help-secretToken.html">
<table> <table>
<f:readOnlyTextbox field="secretToken" id="secretToken"/> <f:readOnlyTextbox field="secretToken" id="secretToken"/>
<f:validateButton title="${%Generate}" method="generateSecretToken"/> <f:validateButton title="${%Generate}" method="generateSecretToken"/>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:entry title="${%Build name}" field="name" help="/plugin/gitee-plugin/help/help-buildName.html"> <f:entry title="${%Build name}" field="name" help="/plugin/gitee-jenkins-plugin/help/help-buildName.html">
<f:textbox default="jenkins"/> <f:textbox default="jenkins"/>
</f:entry> </f:entry>
</j:jelly> </j:jelly>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?> <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:entry title="${%Build name}" field="name" help="/plugin/gitee-plugin/help/help-buildName.html"> <f:entry title="${%Build name}" field="name" help="/plugin/gitee-jenkins-plugin/help/help-buildName.html">
<f:textbox default="jenkins"/> <f:textbox default="jenkins"/>
</f:entry> </f:entry>
<f:entry title="${%Build state}" field="state"> <f:entry title="${%Build state}" field="state">