Audit Steps Action in Deployment Plan or Deployment Template
search cancel

Audit Steps Action in Deployment Plan or Deployment Template

book

Article ID: 419164

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

When a step is added or removed in a Deployment Plan or Deployment Template no record is logged in Audit History Report.
How to track the steps modification in a Deployment Plan or Deployment Template ?

Environment

Release Automation 6.8.*, 6.9.*

Resolution

Actions on Steps (ADD/REMOVE) in a Deployment plan or Deployment template are not reported into the Audit Report History.
This enhancement is currently being worked on by the development team for possible inclusion in a future release of product.

This article gives the list of actions which are recorded in Audit History Report : List of Actions recorded in Audit History Report

Actions on Deployment Plan Step and Deployment Template Step are not present in this list.

As a workaround some SQL Queries could be used.

 

Audit Steps in Deployment Plan

Following SQL Query could be use to get the audit history of actions (CREATE STEP, DELETE STEP) made on the Deployment Plans

SELECT
    ap.APP_NAME AS 'Application',  
    pr.name AS 'Project', 
    pl.name AS 'Deployment Plan', 
    bm.name AS 'Step Name', 
    mo.stageType AS 'Stage Type',
    pc.PROCESS_NAME AS 'Process Name', 

    CASE bm.REVTYPE
        WHEN 0 THEN 'CREATE STEP'
        WHEN 1 THEN 'UPDATE STEP'
        WHEN 2 THEN 'DELETE STEP'
    END AS 'Audit Action',
    DATEADD(SECOND, de.timestamp / 1000, CONVERT(DATETIME, '19700101')) AS 'Audit Action Date', 
    de.username AS 'Audit Action UserName'
FROM rc_release_candidate pl
INNER JOIN rc_version pr ON pr.id = pl.version
INNER JOIN applications ap ON pr.applicationId = ap.id
INNER JOIN rc_rc_module_aud mo ON mo.release_candidate_id = pl.id
INNER JOIN rc_basic_modules_aud bm ON bm.id = mo.id AND bm.REV = mo.REV
INNER JOIN process_container pc ON pc.ID = bm.published_process
INNER JOIN designrevisionentity de ON de.id = bm.REV
ORDER BY ap.APP_NAME, pr.name, pl.name, bm.REV;

Example :

 

 

Audit Steps in Deployment Template

For Deployment Template there are 2 queries :

  • One query to audit the creation, update and deletion of steps in Deployment Template
SELECT ap.APP_NAME 'Application', tpl.name 'Template Category', dp_tpl.name 'Deployment Template Name', bm.name 'Step Name', tpl_part.stageType 'Stage Type',
CASE bm.REVTYPE
   WHEN 0 THEN 'CREATE STEP'
   WHEN 1 THEN 'UPDATE STEP'
   WHEN 2 THEN 'DELETE STEP'
END 'Audit Action',
dateadd(ss, de.timestamp/1000, convert(datetime,'19700101')) 'Audit Action Date', de.username 'Audit Action UserName'
FROM rc_templates tpl
INNER JOIN rc_deploy_template dp_tpl ON dp_tpl.templateid=tpl.id
INNER JOIN applications ap ON tpl.application=ap.id
INNER JOIN rc_template_parts_aud tpl_part ON tpl_part.template_id=tpl.id
INNER JOIN rc_basic_modules_aud bm ON bm.id=tpl_part.id and bm.REV=tpl_part.REV
INNER JOIN designrevisionentity de ON de.id=bm.REV
ORDER BY 1,2,3,bm.REV

 

  • One to audit the link creation and link deletion of steps in a Deployment Template Stages.
SELECT ap.APP_NAME 'Application', tpl.name 'Template Category', dp_tpl.name 'Deployment Template Name', bm.name 'Step Name', tpl_part.stageType 'Stage Type',
CASE steps.REVTYPE
   WHEN 0 THEN 'CREATE LINK'
   WHEN 1 THEN 'UPDATE LINK'
   WHEN 2 THEN 'DELETE LINK'
END 'Audit Action',
dateadd(ss, de.timestamp/1000, convert(datetime,'19700101')) 'Audit Action Date', de.username 'Audit Action UserName'
FROM rc_templates tpl
INNER JOIN rc_deploy_template dp_tpl ON dp_tpl.templateid=tpl.id
INNER JOIN applications ap ON tpl.application=ap.id
INNER JOIN rc_deploy_tempate_stages dt_stages ON dt_stages.deploymentTemplateId=dp_tpl.id
INNER JOIN rc_steps_in_dpstage_aud steps ON steps.rc_deploy_tempate_stages_id = dt_stages.id
INNER JOIN rc_template_parts_aud tpl_part ON tpl_part.id=steps.steps_id
INNER JOIN rc_basic_modules_aud bm ON bm.id=tpl_part.id
INNER JOIN designrevisionentity de ON de.id=steps.REV
ORDER BY 1,2,3,steps.REV