如何跳过特定的执行计划步骤?

How to skip specific Execution Plan Steps?

TaskBlockService there is a POST call that one or more steps should be skipped。没有一个很好的例子给出如何发布XML(字符串列表)要跳过的步骤的路径

为 POSTed 数据尝试了以下内容:

curl  -X POST  https://xldeploy.company.com/deployit/tasks/v2/5e917094-d054-4cc7-940e-89d851ca225a/skip

文件 remove-steps.xml 内容 - 样本 1:

<list>
    <string>0_1_1</string>
</list>

文件 remove-steps.xml 内容 - 示例 2:

<list>
    <string>0-1-1</string>
</list>

您列出的第一种格式是正确的,但您必须确保您使用的是步进路径,而不仅仅是块路径。

假设您通过此调用从部署计划中获取了块。

curl -uadmin:password http://localhost:4516/deployit/tasks/v2/28830810-5104-4ab9-9826-22f66dee265d

这将产生结果:

<task id="28830810-5104-4ab9-9826-22f66dee265d" failures="0" state="PENDING" owner="admin">
  <description>Initial deployment of Environments/local/TestApp001</description>
  <activeBlocks/>
  <metadata>
    <environment>local</environment>
    <taskType>INITIAL</taskType>
    <environment_id>Environments/local</environment_id>
    <application>TestApp001</application>
    <version>1.0</version>
  </metadata>
  <block id="0" state="PENDING" description="" root="true">
    <block id="0_1" state="PENDING" description="Deploy" phase="true">
      <block id="0_1_1" state="PENDING" description="Deploy TestApp001 1.0 on environment local"/>
    </block>
  </block>
  <dependencies/>

如果您想查看块 0_1_1 中的步骤,那么您可以使用此 rest 调用来获取步骤。

curl -uadmin:password http://local6/deployit/tasks/v2/28830810-5104-4ab9-9826-22f66dee265d/block/0_1_1/step

<block id="0_1_1" state="PENDING" description="Deploy TestApp001 1.0 on environment local" current="0">
  <step failures="0" state="PENDING" description="Execute Command"/>
  <step failures="0" state="PENDING" description="Copy File001.txt to Infrastructure/localhost"/>

步骤在块中从 1 开始编号。因此,如果您想跳过步骤 - 将 File001.txt 复制到 Infrastructure/localhost,步骤路径为 0_1_1_2。您的 XML 将如下所示:

<list>
    <string>0_1_1_2</string>
</list>