修复帮助文件找不的问题

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
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
connections = req.bindJSONToList(GiteeConnection.class, json.get("connections"));
useAuthenticatedEndpoint = json.getBoolean("useAuthenticatedEndpoint");
// useAuthenticatedEndpoint = json.getBoolean("useAuthenticatedEndpoint");
refreshConnectionMap();
save();
return super.configure(req, json);

View File

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

View File

@ -4,7 +4,7 @@
<f:entry title="${%Gitee.connections}" >
<f:repeatable var="connection" items="${descriptor.connections}" name="connections">
<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}"/>
<input type="hidden" name="id" value="${connection}"/>
</f:entry>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?>
<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:entry>
</j:jelly>

View File

@ -1,7 +1,7 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<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:entry>
<f:entry title="${%Mark unstable builds as success}" field="markUnstableAsSuccess">

View File

@ -1,7 +1,7 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
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>
<f:entry title="${%Push}" field="triggerOnPush">
<f:checkbox default="true"/>
@ -40,10 +40,10 @@
<!--<f:section title="">-->
<f:radioBlock name="branchFilterType" value="All" title="${%Allow.all.branches}"
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}"
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:textbox name="includeBranchesSpec" field="includeBranchesSpec" autoCompleteDelimChar=","/>
</f:entry>
@ -54,14 +54,14 @@
<f:radioBlock name="branchFilterType" value="RegexBasedFilter" title="${%Filter.branches.by.regex}"
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:textbox name="targetBranchRegex" field="targetBranchRegex"/>
</f:entry>
</f:radioBlock>
</table>
</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>
<f:readOnlyTextbox field="secretToken" id="secretToken"/>
<f:validateButton title="${%Generate}" method="generateSecretToken"/>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?>
<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:entry>
</j:jelly>

View File

@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?>
<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:entry>
<f:entry title="${%Build state}" field="state">