Release Automation

  • 1.  Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 03:42 AM

    Hi,

     

    I am trying to use the action "ROC - Fail Deployment Step" to fail my PrePlan if some actions fail.

    Everything works perfectly but it does nothing...

    The action fails, then the action "ROC - Fail Deployment Step" runs successfully but afterwards, the next action coming in the process (at the end of the flow) runs when it should not...

    Fail Deployment Step.png

     

    So, is it possible to execute the action "ROC - Fail Deployment Step" in PrePlan and PreDeployment ?

    PrePlan creation is called from the create-deployment-plan/ REST service and we need to receive a response if there is some irrecoverable error that occurs during that step, so we need to be able to fail the PrePlan.

    How can we do ?

     

    Regards.



  • 2.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 04:30 AM

    This action work as any other action in the process that he part of ,when the action succeed it will cancel the deployment steps but not its own.

    You can use soap call after the success of the fail deployment step action to stop the process.



  • 3.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 07:53 AM

    Hi Jacky,

     

    Do you mean the stop-release/ service ?

     

    I tried to stop using curl command just to try :

    curl -u <USER>:<PASSWORD> -H "Content-Type: application/json" -X POST -d '{"releaseId":"218770"}' http://<DNS_CARA>/datamanagement/a/api/v3/stop-release

     

    And get the message :

    {"result":false,"description":"releaseId[218770] not exist."}

     

    But when I go on ROC, I can access the URL : http://<DNS_CARA>/datamanagement/index.jsp#/main/releases/218770

    stop-release.png

     

    Regards.



  • 4.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 08:26 AM

    There is stop process  soap call where you can use the job id to stop it.



  • 5.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 08:51 AM

    Sorry but could you give me the name of that soap call, I cannot find nothin in REST API search URL.

     

    Regards.



  • 6.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 09:06 AM

    jacky was talking about the SOAP API, not the REST API:

     

    SOAP API Reference - CA Release Automation - 6.1 - CA Technologies Documentation



  • 7.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted May 20, 2016 09:55 AM

    OK, never heard about that SOAP API, I will have a look at it once I have time.

     

    Thank you for your help.

     

    Regards.



  • 8.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan
    Best Answer

    Posted May 25, 2016 03:32 AM

    Hi,

     

    So, it worked using the Action "SOAP Request" and calling the StopJob Service.

     

    Help about the OpenAPIService can be found at :

    http://<CARA_DNS>/datamanagement/docs/index.html

    http://<CARA_DNS>/datamanagement/ws

     

    An easy way to find how to structure the XML request is to use a tool as SoapUI and call the WSDL : http://<CARA_DNS>/datamanagement/ws/OpenAPIService?wsdl

     

    To use the Action "SOAP Request" it is necessary to have the XML request as a file, so first, we have to use an action  to create that file.

     

    So the actions to stop a Plan (in the right order), should be :

    1 - "ROC - Fail Deployment Step"

    2 - "Add Text to a file" : to create the XML Request

    3 - "SOAP Request" to call the StopJobService

     

    Thank for the help.

     

    Regards.



  • 9.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted Jul 13, 2016 03:43 PM

    FWIW, I have experimented with the /stop_release REST API call and found that it appears to work to terminate a deploymen, although it does so "quietly." You'll need to pay atttention or build in some notification stuff to know that a deployment has failed, and of course, there's no opportunity to review run-time data once the deployment has terminated.



  • 10.  Re: Action ROC - Fail Deployment Step does not fail my PrePlan

    Posted Aug 16, 2016 02:58 AM

    Hi Mark,

    That is exactly what I did, I send and email before stopping the deployment and yes I lose runtime data once deployment has finished so I use it only for quite known cases.

    But when the following idea is implemented, Action inputs/outputs should be stored and visible historically , it will be OK.

     

    Regards.