简体   繁体   English

Jenkins将不会保存全局工具配置

[英]Jenkins won't save global tool configuration

Currently trying to install the groovy plugin on Jenkins, but for some reason whenever I configure a groovy installer (or ant installer, other things are also not saving), after I apply/save and leave the page, when I come back it's blank, like I did nothing. 当前正在尝试在Jenkins上安装groovy插件,但是由于某种原因,每当我配置/保存并离开页面后,当我配置一个groovy安装程序(或ant安装程序,其他东西也没有保存)时,当我回来时它都是空白的,就像我什么也没做。 What could this be? 这可能是什么?

By the way, the Jenkins server is running on a Mac. 顺便说一下,Jenkins服务器正在Mac上运行。

Edit: Pictures 编辑:图片

每次我转到页面 按新安装后

Edit 2: config.XML with userRemoteConfigs section removed 编辑2:删除了userRemoteConfigs部分的config.XML

<?xml version='1.0' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.1">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>20</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
  </properties>
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.2">
    <scm class="hudson.plugins.git.GitSCM" plugin="git@2.4.4">
      <configVersion>2</configVersion>
      <branches>
        <hudson.plugins.git.BranchSpec>
          <name>*</name>
        </hudson.plugins.git.BranchSpec>
      </branches>
      <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
      <submoduleCfg class="list"/>
      <extensions/>
    </scm>
    <scriptPath>Android/btMobileApp/Jenkins_Dev</scriptPath>
  </definition>
  <triggers>
    <hudson.triggers.SCMTrigger>
      <spec>H/2 * * * *</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
  <concurrentBuild>false</concurrentBuild>
</flow-definition>

It's a bug in Jenkins, but it's only affecting the view. 这是詹金斯(Jenkins)中的错误,但仅会影响视图。 If you click on "Groovy installations" (or any of the other installation buttons), you'll see that the state you entered, such as name, is still there. 如果单击“ Groovy安装”(或任何其他安装按钮),则会看到您输入的状态(如名称)仍然存在。

Note that nothing is downloaded or installed when you configure tools in "Global Tool Configuration". 请注意,在“全局工具配置”中配置工具时,不会下载或安装任何内容。 The tools are downloaded when you use them in a build. 当您在内部版本中使用工具时,将下载它们。 Therefore it's important that the name of the tool in the configuration page matches the name you use in a build. 因此,重要的是配置页面中工具的名称必须与您在构建中使用的名称相匹配。

So for example, if I where to configure Maven. 因此,例如,如果我在哪里配置Maven。 I would give the maven installation a name "Maven 3" in "Global Tools Configuration", and then configure my Jenkinsfile like this 我将在“全局工具配置”中为maven安装命名为“ Maven 3”,然后像这样配置我的Jenkinsfile

node {
    stage 'Build and test'
    env.PATH = "${tool 'Maven 3'}/bin:${env.PATH}"
    checkout scm
    sh 'mvn clean install'
}

Configuring the installer from Manage Jenkins does not actually install the tool immediately. 实际上,从Manage Jenkins配置安装程序不会立即安装该工具。 It will be installed when you run a job that utilizes that tool. 当您运行使用该工具的作业时,它将被安装。 The configuration page also has a tendency to hide details when you reload the page. 重新加载页面时,配置页面还倾向于隐藏细节。 For example, on my server I have an Ant installation, but not a Groovy Installation. 例如,在我的服务器上,我有一个Ant安装,但没有Groovy安装。 You can tell the difference on the config page by which button appears. 您可以通过出现哪个按钮来区分配置页面。 Example Configure System Page 示例配置系统页面

If you don't have anything configured, you will see an "Add {tool}" button, otherwise the button will say "{tool} installations...". 如果未进行任何配置,将看到“添加{tool}”按钮,否则该按钮将显示“ {tool}安装...”。 You can click the "{tool} installations..." button and it should expand to show your configurations. 您可以单击“ {tool}安装...”按钮,该按钮应展开以显示您的配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Jenkins全局工具配置中配置Ansible? - How to configure Ansible in Jenkins Global Tool Configuration? 如何在jenkins文件中引用Jenkins的全局工具配置中设置的工具? - how to reference the tool that is set in the global tool configuration in Jenkins in the jenkinsfile? jenkins for git安装目录的全局工具配置没有此类文件错误 - There is no such file error in global tool configuration in jenkins for git installation directory Jenkins:全局工具配置-设置因代理而异 - Jenkins : Global Tool Configuration - setup differs based on agent 使用 groovy 在 Jenkins“全局工具配置”中安装 Snyk - Install Snyk in Jenkins "Global Tool Configuration" using groovy 使用CLI / groovy配置Jenkins“全局工具配置” - configure Jenkins “Global Tool Configuration” using CLI / groovy 使用脚本设置Jenkins“全局工具配置”属性 - Set Jenkins “Global Tool Configuration” properties using script 应用和保存按钮在 Jenkins 上不起作用 - Apply and save buttons won't work on Jenkins Jenkins尝试使用Manage Jenkins配置JDK和Maven,但是我没有在页面中看到这些部分和“ Global Tool Configuration” - Jenkins trying to configure JDK and Maven with Manage Jenkins, but I do not see those sections and “Global Tool Configuration” in the page Docker中的Jenkins SCM同步配置插件无法与Github对话 - Jenkins SCM Sync Configuration Plugin In Docker Won't Talk to Github
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM