2017-04-26 72 views
0

TaskBlockServicePOST致電that one or more steps should be skipped。給出如何發佈XML(字符串列表)步驟的路徑以跳過沒有一個很好的例子。如何跳過特定的執行計劃步驟?

嘗試用於發佈數據如下內容:

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> 

回答

1

第一你列出的格式是正確的,但你必須確保你正在使用步驟路徑和而不僅僅是一個塊的路徑。

比方說,您可以通過此調用獲取部署計劃中的塊。

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到基礎設施/本地主機步路徑是0_1_1_2。您的XML將如下所示:

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