we are launching some deploys that runs in different servers.
At the end of the deploy I need to make next summary according to the order of execution and write it into a file:
- If the step is finished correctly I have to write "Step 1 has finished correctly"
- If the steps finishes wrong: all of my processes use a ROC Fail deployment step. When this step fails I should write an specific message per each process. The message to write in the file, for example, could be "Step 2 - Finished with error. Contact to DevOps Team2.
At the very beginning I was using a "property"/release variable and the I update the value, but I could need to know, out of CA RA, the status of a deploy (the same info of the former file).
There is no rest to query by steps so I think the only way is to use a BBDD query .
I'm using CA Ra 6.5 and oracle.
Does anyone have any idea how to do it?
Although it seems no responses, does anyone have any ideas?
I think that it is difficult to implement using existed functions.
If you have any monitoring tools, it is reasonable to check if "ERROR" is recorded in nolio_action_exe.log or nolio_all.log on agents, I think.
Long time no talk. I hope all is well. Could you check this discussion and let us know if it helps?
Getting Deployment (Deployment) Status runtime (Succeeded or Failed)?
@Gegg (a pleasure to come back!! ) : the discussion helps, but not at all.
The main problem is that I need to send some specific and customization messages, not only succeeded or failed.
For instance, if an step fail because of some directories are not created, I need to send which specific folders are not created.
@Yasuyuki: I thought about it, but I'm not able to afford it.
I was thinking in create a Release parameter / Property and update the value per each step execution.
The main problem is if I do it my processes will not be atomic/reusable at all.
I though to leave the output in a file, but the problem is the same as Release Parameter.
I do not find a good solution apart of a query in DB.
What do you think??
I am positive that this query is nothing official. I just did some quick digging around and found that I could get the description text returned by the action. Maybe it will help:
select * from steps where job_id in (select id from execution_jobs where release_id = <Your Release ID>) AND STEP_STATE='FAILED_PAUSED';
But in your example you describe a scenario where if an action fails to create some directories then you want to provide a message of which specific directories were not created. In this kind of scenario I'm not sure the message in the actions descriptive response would be sufficient either - you'd have to test. If not then you're potentially looking at additional action to build on the informational message you're looking for.
In my understanding, RA doesn't have the functions for your scenario and we don't have supported ways.
I don't recommend to use queries directly even if you could implement. Because it is possible to update database schema without any notifications, so it will be roadblock to upgrade.
Additionally, some processes for each steps may cause performance issue.
Health monitor function was removed from RA Because monitoring tools like UIM and APM (or 3rd party products) have rich functions rather than RA health monitoring. So, I recommended on my first reply.
Monitor Health and Availability - CA Release Automation - 6.6 - CA Technologies Documentation
If you don't want request directly the CA RA database,you can use these internals HTTP REST calls (not public and not documented and not supported at all) :
Getting jobId list for a specific release (only the Deployment step's stage):
Getting all steps informations (Agent,Start,End,Step Name,Step Id,Status,Comments) for a specific job :
Authentification can be done with HTTP basic authentication (with preauth)
I've develop this process and although it's not the at 100% what I was looking for, it works
I've developed the process.
The first rest is working fine.
But the second one from SOAP UI is working ok, but when I execute it from CA RA I get next error:
Do you know which can be the reason?
With CA RA REST Action you need to convert special characters following "URL encoding" format.
In this REST call you have brackets that should be encoded.
So, with CA RA REST Action you should call this URI :
I've changed and it works.
you could use the ROC action "ROC - Get Deployment State in JSON"
then you parse the JSON to retrieve status for each step