<i id='1DgqX'><tr id='1DgqX'><dt id='1DgqX'><q id='1DgqX'><span id='1DgqX'><b id='1DgqX'><form id='1DgqX'><ins id='1DgqX'></ins><ul id='1DgqX'></ul><sub id='1DgqX'></sub></form><legend id='1DgqX'></legend><bdo id='1DgqX'><pre id='1DgqX'><center id='1DgqX'></center></pre></bdo></b><th id='1DgqX'></th></span></q></dt></tr></i><div id='1DgqX'><tfoot id='1DgqX'></tfoot><dl id='1DgqX'><fieldset id='1DgqX'></fieldset></dl></div>
<tfoot id='1DgqX'></tfoot>
    <bdo id='1DgqX'></bdo><ul id='1DgqX'></ul>

<small id='1DgqX'></small><noframes id='1DgqX'>

    1. <legend id='1DgqX'><style id='1DgqX'><dir id='1DgqX'><q id='1DgqX'></q></dir></style></legend>

      1. 如何将文件传递给阻止上游作业的下游作业?

        时间:2023-07-28

        • <small id='RUEoS'></small><noframes id='RUEoS'>

            <tbody id='RUEoS'></tbody>

            <i id='RUEoS'><tr id='RUEoS'><dt id='RUEoS'><q id='RUEoS'><span id='RUEoS'><b id='RUEoS'><form id='RUEoS'><ins id='RUEoS'></ins><ul id='RUEoS'></ul><sub id='RUEoS'></sub></form><legend id='RUEoS'></legend><bdo id='RUEoS'><pre id='RUEoS'><center id='RUEoS'></center></pre></bdo></b><th id='RUEoS'></th></span></q></dt></tr></i><div id='RUEoS'><tfoot id='RUEoS'></tfoot><dl id='RUEoS'><fieldset id='RUEoS'></fieldset></dl></div>

              <bdo id='RUEoS'></bdo><ul id='RUEoS'></ul>

              1. <tfoot id='RUEoS'></tfoot><legend id='RUEoS'><style id='RUEoS'><dir id='RUEoS'><q id='RUEoS'></q></dir></style></legend>

                  本文介绍了如何将文件传递给阻止上游作业的下游作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想要完成的是从 develop 分支签出代码,将其合并到 master 分支,构建 app.war,运行测试如果测试成功,则推送到 master 分支.

                  测试应该在需要 app.war 的单独作业中运行.

                  我目前的设置如下:

                  1. Job Maindevelop 签出,合并到 master 并构建 app.war
                  2. Job MainPost build step 中触发job Test (Test 需要app.war 以前构建的)
                  3. 如果 Test 成功,Main 推送到 Post build action
                  4. 中的 master 分支

                  我尝试使用 Copy Artifact Plugin,但问题是使用它时,我只能在触发 Test<时在 Post build action 中存档工件/code> 在构建后步骤.

                  如何将 app.war 传递给 Test 作业?是否可以使用 Copy Artifact Plugin?

                  解决方案

                  1.复制工件

                  您可以在其周围放置一个包装作业,并通过在其他项目上使用触发/调用构建,将构建作业和测试作业称为构建步骤.由于构建现在被封装在自己的作业中,您可以归档其工件并将它们复制到 Test 作业.

                  2.共享工作区

                  另一种方法是在构建和测试之间共享一个工作区.

                  3.将文件作为参数传递

                  将文件传递给下游作业的一种巧妙方法是,在

                  注意:您的下游作业确实不需要需要设置选项This build is parameterized,文件将被复制.这可能不再有效,请参阅评论.

                  What I want to accomplish is to checkout code from develop branch, merge it to master branch, build app.war, run tests and if tests succeed push to master branch.

                  Tests should be run in separate job which needs app.war.

                  My current setup is as follows:

                  1. Job Main checks out from develop, merges it to masterand builds app.war
                  2. Job Main triggers job Test in Post build step (Test needs app.war previously built)
                  3. If Test succeeds, Main pushes to master branch in Post build action

                  I tried to use Copy Artifact Plugin but the problem is that with it, I can only archive artifact in Post build action while I am triggering Test in Post build step.

                  How to pass app.war to Test job? Is it possible to do with Copy Artifact Plugin?

                  解决方案

                  1. Copying artifacts

                  You can put a wrapper job around it and have the Build job and the Test job called as build step by using Trigger/call builds on other projects. Since the build is encapsuled in its own job now, you can archive its artifacts and copy them over to the Test job.

                  2. Share workspace

                  Another way would be to just share a workspace between build and test.

                  3. Pass file as parameter

                  A neat way to pass a file to a downstream job is, to pass it as parameter with the help of the Parameterized Trigger Plugin.

                  You push a file into your downstream job's workspace simply by selecting the parameter factory For every matching file, invoke one build in a build step Trigger/call builds on other projects. There you specify the target file (wildcards allowed) and the name it should get in the child workspace.

                  Note: Your downstream job does not need to have the option This build is parameterized set, the file will be copied either way. Edit: This might not work anymore, see comments.

                  这篇关于如何将文件传递给阻止上游作业的下游作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                    <small id='VxdSJ'></small><noframes id='VxdSJ'>

                  1. <i id='VxdSJ'><tr id='VxdSJ'><dt id='VxdSJ'><q id='VxdSJ'><span id='VxdSJ'><b id='VxdSJ'><form id='VxdSJ'><ins id='VxdSJ'></ins><ul id='VxdSJ'></ul><sub id='VxdSJ'></sub></form><legend id='VxdSJ'></legend><bdo id='VxdSJ'><pre id='VxdSJ'><center id='VxdSJ'></center></pre></bdo></b><th id='VxdSJ'></th></span></q></dt></tr></i><div id='VxdSJ'><tfoot id='VxdSJ'></tfoot><dl id='VxdSJ'><fieldset id='VxdSJ'></fieldset></dl></div>
                      <bdo id='VxdSJ'></bdo><ul id='VxdSJ'></ul>
                        <tbody id='VxdSJ'></tbody>
                      <legend id='VxdSJ'><style id='VxdSJ'><dir id='VxdSJ'><q id='VxdSJ'></q></dir></style></legend>

                          <tfoot id='VxdSJ'></tfoot>