XL-Deploy: How to retrieve information about an Exection Plan Step?

Verhagen Source

In TaskBlockService there is a GET call retrieves information about a step given /tasks/v2/{taskid}/step/{stepPath}.

Question How to specify the value for the stepPath ?



answered 1 year ago D Rob #1

The approach would be to first get the task blocks:

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

From there you can use the block id to list the steps for a particular block:

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

There the steps will be listed and you can use the order of that list to deduce the step path, i.e. the steps are numbered within the block starting from 1.

So the first step in block 0_1_1 has path 0_1_1_1.

answered 1 year ago Shashank Srivastava #2

First, lets see what blocks do we have inside a given task.

Lets suppose, b9f5b44c-1754-4689-9129-e79376268d21 is the Task ID. Below is the REST call. Change localhost:4516 to your own XLD Host:Port.


It will return details about this very task. I am only pasting the relevant part i.e. list of blocks within this task.

<block id="0" state="FAILED" description="" hasSteps="true" root="true">
        <block id="0_1" state="FAILED" description="Deploy" hasSteps="true" phase="true">
            <block id="0_1_1" state="FAILED" description="Deploy MySQL 1.0 on MySQL" hasSteps="true"/></block>
        <block id="0_2" state="PENDING" description="" hasSteps="true" phase="true">
            <block id="0_2_1" state="PENDING" description="Register changes for MySQL" hasSteps="true"/></block>

Block ID 0 means parent block. Inside it, we can see there are multiple child blocks viz. 0_1 & 0_2. And within these child blocks, there are 2 steps viz. 0_1_1 & 0_1_2.

So, in order to see details about these steps, prefix step/0_1_1_1 to above REST call.

Please note above that I specified 0_1_1_1 which is a stepPath inside 0_1_1. It gives output similar to below.

<step failures="0" state="DONE">
    <description>Run 01-CreateTable.sql on MySQLClient</description>
    <log>Uploading artifact [/tmp/ot-20170426T072630452.1/Archive.zip]

Similarly, If I replace step/0_1_1_1 with step/0_1_1_2 in above REST call, I can see details of other stepPath i.e. 0_1_1_2.

<step failures="1" state="FAILED">
    <description>Run 02-CreateUser.sql on MySQLClient</description>
    <log>Uploading artifact [/tmp/ot-20170426T072632621.1/Archive.zip]

I hope, this clarifies how to specify value for stepPath in XL Deploy.

comments powered by Disqus