第一你列出的格式是正確的,但你必須確保你正在使用步驟路徑和而不僅僅是一個塊的路徑。
比方說,您可以通過此調用獲取部署計劃中的塊。
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>