【问题标题】:jenkins start async "Spawning processes from build"jenkins 启动异步“从构建生成进程”
【发布时间】:2015-04-13 17:17:00
【问题描述】:

不确定这段代码从https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build复制到哪里 试图把它放在我的工作 config.xml 中

<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description>dont use now</description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.BatchFile>
      <command>\work\s1.bat</command>
    </hudson.tasks.BatchFile>

    <scriptdef name="get-next-minute" language="beanshell">
  <attribute name="property" />

  date = new java.text.SimpleDateFormat("HH:mm")
    .format(new Date(System.currentTimeMillis() + 60000));
  project.setProperty(attributes.get("property"), date);
</scriptdef>

<get-next-minute property="next-minute" />
<exec executable="at">
  <arg value="${next-minute}" />
  <arg value="/interactive" />
  <arg value="\work\start.bat" />
</exec>
  </builders>
  <publishers/>
  <buildWrappers/>
</project>

但现在 UI 中没有显示该作业(上面在记事本++上编辑)

【问题讨论】:

    标签: process jenkins


    【解决方案1】:

    两种选择:

    • 重启 Jenkins

    • 进入“管理 Jenkins”>“从磁盘重新加载配置”

    希望有帮助

    【讨论】:

    • 不,我的问题是如何/在哪里放置该代码?它是 config.xml 的一部分还是从詹金斯调用的 ant 脚本的一部分。我知道如何摆脱工作文件夹/重置它。我想知道的是我的问题中的代码。
    猜你喜欢
    • 2010-10-11
    • 2011-03-30
    • 1970-01-01
    • 1970-01-01
    • 2016-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-25
    相关资源
    最近更新 更多