Release Automation

  • 1.  Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Posted Sep 18, 2017 01:55 PM

    I am trying to get deployment status from below API during Runtime.


    POST http://<host>:< port>/datamanagement/a/api/<versionId>/release-status 

     

    I added REST Operation API action at the end of Deployment Flow.

    ( I could able to pass application,release,environment and version and get the status reply as well).

    and got reply from "Deployment" stage process flow below :

    {"id":"94","result":true,"description":"45%Running","stage":"Deployment","stageState":"Running","releaseStatus":"Active"}

    Problem is it results only "Running" State from this i could not conclude "releaseStatus" Whether Failed or Succeeded.

     

    I tried giving the same in Post Deployment Step.

    There also same problem as above.

    Sample reply from "Post Deployment" stage is below :
    {"id":"94","result":true,"description":"0% Running Post-Deployment","stage":"Post-Deployment","stageState":"Running","releaseStatus":"Active"}


    How can I get the Deployment step Status once it completed ( Failed or Succeeded) during Runtime?



  • 2.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Posted Sep 21, 2017 08:58 AM

    Hi All,

     

    any input on this .

     

    This is bit critical requirement for us.

     

    Regards

    Mohanraj



  • 3.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Broadcom Employee
    Posted Jan 02, 2018 09:53 AM

    Hi 

     

    I know it is a bit late , but where you ever able to get a answer on this one ?

    I think api you are referring to will show the status and progress for a running active  deployment 

    After the deployment is finished you can check the status in the reports 

     

    Regards 

    Dirk 



  • 4.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Posted Jan 02, 2018 10:03 AM

    I understood your point Dirk. But we need to post the status on the deployment flow (i.e post deployment flow) as of now we are doing like if the deployment status is completed and if it enters post deployment step then i am posting success status 



  • 5.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Broadcom Employee
    Posted Jan 02, 2018 11:00 AM

    Hi Mohanraj,

     

    I'm not exactly certain of what you want to do and when you want to do it so please bear with me. In one of my applications I use a deployment plan with a few deployment steps and a post deployment step. My post deployment preferences are set to always run, fail the deployment when on post deployment failures and automatically run post deployment. The reason why I have it set this way is because I send email notifications for successful and failed deployments. 

     

    I use two actions to find out the status of the deployment phase. Both of them are run command line though you could probably get it working using other actions. Here are the commands I use:

     

    1. curl -s -X GET http://myraserver:8080/datamanagement/a/api/v4/deployment-state/<Release ID> -u <RA Read Only Username>:<RA Read Only User Password> | jq . > <Release ID>_output.txt
    2. cat <Release ID>_output.txt | jq '.deploymentStages[] | select(.name == "Deployment") | .state' | tr -d '"'

     

    I just realized that the jq is unnecessary in the first command. Jq is the command to json query the output. Anything surrounded by < and > means it is a parameter. Using this API I can get the status of the entire Deployment phase and each step if so desired as well as Post (and probably pre - i just don't have a pre-deploy step defined).

     

    I hope this helps.

     

    Kind regards,

    Gregg



  • 6.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Posted Jan 04, 2018 05:24 AM

    I think the problem here is, that he wants info about the deployment step itself and not the whole deployment run.

     

    We get this info by querying the database in the post deployment. this one retrieves failed steps:

     

    SELECT * FROM nolio_db.dbo.rc_releases rr INNER JOIN nolio_db.dbo.rc_stages rs ON rr.id = rs.release_id WHERE rr.id = Release ID AND rs.stage_mode = 'FAILED' AND rs.type = 'RUN'



  • 7.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?
    Best Answer

    Broadcom Employee
    Posted Jan 04, 2018 10:36 AM

    Hi Michael,

    The RestAPI that I shared supplies both. I just so happen to use jq to get the overall status of the Deployment phase. But jq could be used to parse for the status of each individual step too. Using an sql query works too. Thanks for sharing your query. There is more than one way to skin this cat.

     

    Cheers,

    Gregg



  • 8.  Re: Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?

    Broadcom Employee
    Posted Jan 15, 2018 10:04 AM

    Hi 
    I believe your questions has been answered, I will mark this as the correct answer.
    When your question is not answered or you still have additional questions please let us know.
    With Kind Regards

    Dirk