Release Automation

Expand all | Collapse all

How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

  • 1.  How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 10, 2015 08:35 AM

    Hi, with the current consultations/reporting in the 'Release automationcenter' or the 'automation studio report', I cannot select on an easy way what is not yet deployed in a higher environment (e.g. compare development with
    integration test and give me the list of deployments to do and in the order to do).

     

    does someone has a solution for this? Or created a home made report? we have Version: 5.5.0.849

     

    thanks you very much if you want to share this with us (Axa bank Europe)

     

    regards, Guido



  • 2.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 10, 2015 09:48 AM

    Hello Guido, one of the options is using 'Deployment Comparison Report' which is available as reporting content on Dashboard. It lists the various deployments specific to an application and environment. On running the report, it provides a detailed comparison between two selected deployments. Based on this information you could then select a particular deployment to run in order of deployment or directly select a stable version downstream instead of following a certain order via Releases > Deployment Pipeline Overview.

     

    If you are looking for a graphical overview of existing versions, you could start with the Deployment Pipeline Overview and then switch to Deployment Comparison Report for a drill down.

     

    Does that help?



  • 3.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 10, 2015 10:21 AM

    Hi, indeed, this is a report that I know. but with this you have to compare each deployment individual.

     

    it would me very easy if I just can select:

    - the application

    - the project

    - the period

    - the start stage (e.g. FT) in the left part of the screen

    - the end stage (e.g. STG) in the right part of the screen

     

    and then push: COMPARE

     

    but this is not possible (compare button is grayed out until you select deployments). Is there another way to do this?

     

    regards, Guido



  • 4.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 11, 2015 05:41 AM

    Can you use DB query?

    The following query will list all the deployments done in the selected environments based on the most recent deployment plan, and its easy to see which plan was execute only on one of the environments only (Probably there is more sophisticated query but I am not DB expert)

     

    The query I use:

    use nolio_db55;

    select distinct rcr.release_candidate As Deployment_plan_id,(e.name) as Environment_name,(rcr.name) as Deployment_name, rcr.name as Deployment_plan_name,app.APP_NAME from rc_stages rcs

    inner join rc_releases rcr on rcr.id=rcs.release_id
    inner join environments e on e.id=rcs.environment
    inner join applications app on app.id=rcr.application
    where e.name ='Dev' or e.name = 'Production'

    order by release_candidate desc;

    The output

    DP queries.png

    Hope this help

    Thanks

    Jacky



  • 5.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment
    Best Answer

    Posted Jul 13, 2015 08:56 AM

    Hi, thanks, i tested the sql and it works, i will use it as startpoint. If I have more detail, i will share it again,

     

    regards, Guido



  • 6.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 14, 2015 02:44 AM

    Here is updated query that return the deployment plans that execute in one environment and not on the other.

    select ra.* from

    (

    -- query that returns the DPs that run in Environment one

        select distinct rcr.release_candidate As Deployment_plan_id,(e.name) as Environment_name,(rcr.name) as Deployment_name, rcr.name as Deployment_plan_name,app.APP_NAME

      from rc_stages rcs

        inner join rc_releases rcr on rcr.id=rcs.release_id

        inner join environments e on e.id=rcs.environment

        inner join applications app on app.id=rcr.application

        where e.name ='Dev'

    )ra

    where Deployment_plan_id NOT IN

    (

    -- query that returns the DPs that run in Environment two

        select distinct rcr_2.release_candidate As Deployment_plan_id

        from rc_stages rcs_2

        inner join rc_releases rcr_2 on rcr_2.id=rcs_2.release_id

        inner join environments e_2 on e_2.id=rcs_2.environment

        inner join applications app_2 on app_2.id=rcr_2.application

        where e_2.name = 'Production'

    )

    order by Deployment_plan_id desc

    ;

     

    DP queries2.png



  • 7.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 14, 2015 04:06 AM

    Hi, works great, thanks, Guido



  • 8.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 24, 2015 03:52 AM

    Hi Jacky, is there somewhere in the database/tables a deployment date/state/status that I can include in the query? Now it gives a correct list but I would like to add these attributes so that we can see when it is done in the lowest environment and with what result.

        

    I have searched the database but could not find it (but it is there because !we can consult it on the screens of the RA tool)

     

    thanks for your help, Guido



  • 9.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 24, 2015 04:30 AM

    Hi,

     

    jacky already uses all the tables you might need, rc_stages lists all the stages for a deployment, It will give you a so called "stage_mode" column, that gives you information about the state (e.g. finished or failed) and the stage itself can be found in "type" (or "currentStage" from rc_release)

     

    if you need help setting up the query, just say so, for now I only pointed in the directions and left you to go on your own :-)

     

    best regards

    michael



  • 10.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 24, 2015 04:35 AM

    Hi

    I updated the query to include deployment status and start time (Note the from_unixtime command that is MySQL command)

     

    use nolio_db55;select ra.* from

    (

     

     

        select distinct rcr.release_candidate As Deployment_plan_id,(e.name) as Environment_name,(rcr.name) as Deployment_name,rcr.release_result as Status ,from_unixtime(rcm.startTime/1000) As Deployment_start_time, rcr.name as Deployment_plan_name,app.APP_NAME

      from rc_stages rcs

        inner join rc_releases rcr on rcr.id=rcs.release_id

      inner join rc_modules rcm on rcm.stage_id=rcs.id

        inner join environments e on e.id=rcs.environment

        inner join applications app on app.id=rcr.application

        where e.name ='Dev'

    )ra

    where Deployment_plan_id NOT IN

    (

     

     

        select distinct rcr_2.release_candidate As Deployment_plan_id

        from rc_stages rcs_2

        inner join rc_releases rcr_2 on rcr_2.id=rcs_2.release_id

        inner join rc_modules rcm_2 on rcm_2.stage_id=rcs_2.id

      inner join environments e_2 on e_2.id=rcs_2.environment

        inner join applications app_2 on app_2.id=rcr_2.application

        where e_2.name = 'Production'

    )

     

     

    group by Deployment_plan_id

    order by Deployment_plan_id desc;

     

    Hope this will help

    Thanks

    Jacky



  • 11.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 31, 2015 03:15 AM

    Hi Jacky,

     

    do you have an idea how to get the agent as well on which the deployment did run?

     

    I know that the agents are listed in the dbo.servers table, but I can't find any reference to join the servers with the deployment

     

    thanks.

     

    -michael



  • 12.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Jul 31, 2015 08:02 AM

    Agents can be retrieve per deployment step.

    The following query will list agents per deployment step (I limit the output to specific deployment id )

     

    use nolio_db55;

    select distinct (ofe.host_ip),rcbm.name as step_name,rcr.release_candidate As Deployment_plan_id,(e.name) as Environment_name,(rcr.name) as Deployment_name,rcr.release_result as Status ,rcr.name as Deployment_plan_name,rcr.id as Deployment_id,app.APP_NAME

      from rc_stages rcs

      inner join rc_releases rcr on rcr.id=rcs.release_id

      inner join rc_modules rcm on rcm.stage_id=rcs.id

      inner join environments e on e.id=rcs.environment

      inner join applications app on app.id=rcr.application

      inner join rc_basic_modules rcbm on rcbm.id=rcm.id

      inner join offline_execution_jobs oej on oej.id=rcm.job_id

      inner join offline_flow_events ofe on oej.id = ofe.job_id

     

        where rcr.id=DEPLOYMENT_ID

     

     

    order by Deployment_id desc;

     

    output below

     

    AgentPerStep.png

    Thanks

    Jacky



  • 13.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Aug 03, 2015 01:05 AM

    thanks a lot!



  • 14.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Aug 03, 2015 02:16 AM

    Hi Jacky, I need a last additional information in the query but I cannot connect it to the data I already retrieve.

     

    from the table "rc_release_candidate" i need the columns "Build" , "Name" , "Description" for all the deployes that are not yet ddone on the 'higher' environment.

     

    can you tell me how I can retrieve it with the sql you already provided (and this is already a great help)

    use nolio_db55;select ra.* from

    (

     

     

        select distinct rcr.release_candidate As Deployment_plan_id,(e.name) as Environment_name,(rcr.name) as Deployment_name,rcr.release_result as Status ,from_unixtime(rcm.startTime/1000) As Deployment_start_time, rcr.name as Deployment_plan_name,app.APP_NAME

      from rc_stages rcs

        inner join rc_releases rcr on rcr.id=rcs.release_id

      inner join rc_modules rcm on rcm.stage_id=rcs.id

        inner join environments e on e.id=rcs.environment

        inner join applications app on app.id=rcr.application

        where e.name ='Dev'

    )ra

    where Deployment_plan_id NOT IN

    (

     

     

        select distinct rcr_2.release_candidate As Deployment_plan_id

        from rc_stages rcs_2

        inner join rc_releases rcr_2 on rcr_2.id=rcs_2.release_id

        inner join rc_modules rcm_2 on rcm_2.stage_id=rcs_2.id

      inner join environments e_2 on e_2.id=rcs_2.environment

        inner join applications app_2 on app_2.id=rcr_2.application

        where e_2.name = 'Production'

    )

     

     

    group by Deployment_plan_id

    order by Deployment_plan_id desc;



  • 15.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Aug 03, 2015 02:40 AM

    Update SQL below

     

    use nolio_db55;select ra.* from

    (

     

     

       select distinct rcr.release_candidate As Deployment_plan_id,rcrc.build as Deployment_plan_build, (e.name) as Environment_name,(rcr.name) as Deployment_name,rcr.release_result as Status ,from_unixtime(rcm.startTime/1000) As Deployment_start_time, rcr.name as Deployment_plan_name,rcrc.description as Deployment_plan_description,  app.APP_NAME

      from rc_stages rcs

        inner join rc_releases rcr on rcr.id=rcs.release_id

      inner join rc_release_candidate rcrc on rcrc.id = rcr.release_candidate

      inner join rc_modules rcm on rcm.stage_id=rcs.id

        inner join environments e on e.id=rcs.environment

        inner join applications app on app.id=rcr.application

        where e.name ='Dev'

    )ra

    where Deployment_plan_id NOT IN

    (

     

     

        select distinct rcr_2.release_candidate As Deployment_plan_id

        from rc_stages rcs_2

        inner join rc_releases rcr_2 on rcr_2.id=rcs_2.release_id

        inner join rc_modules rcm_2 on rcm_2.stage_id=rcs_2.id

      inner join environments e_2 on e_2.id=rcs_2.environment

        inner join applications app_2 on app_2.id=rcr_2.application

        where e_2.name = 'Production'

    )

     

     

    group by Deployment_plan_id

    order by Deployment_plan_id desc;

     

    Thanks

    Jacky



  • 16.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Aug 31, 2015 05:08 AM

    Hi thanks, it works great.

     

    To CA: can this be included in the compare option of CA Release automation?

     

    thanks, Guido



  • 17.  Re: How can i (on an easy way) find deployments that are done in the Development environment but not yet done in our integration test environment

    Posted Oct 02, 2015 01:20 AM

    Hi,

     

    so again thanks to jacky for these great queries here, I extended my version of it a bit, so that the deployed packages are now listed as well, so I thought I'm just sharing it in this thread, maybe someone has some need for it too:

     

    select distinct
      ofe.host_ip as 'Server',
      DATEADD(SECOND, rcs.endTime/1000 ,'1970/1/1') as 'Date',
      e.name as 'Environment',
      rcr.id as 'ID',
      rcr.name as 'Name',
      rcr.release_result as 'Status',
      rcr.release_candidate as 'DeploymentPlanID',
      rcr.name as 'PlanName',
      app.APP_NAME as 'ApplicationName',
      rcv.name as 'ProjectName',
      ad.name as 'PackageName',
      rca.artifact_version as 'PackageVersion'
    from rc_stages rcs
      inner join rc_releases rcr on rcr.id=rcs.release_id and rcs.type = 'RUN'
      inner join rc_modules rcm on rcm.stage_id=rcs.id
      inner join environments e on e.id=rcs.environment
      inner join applications app on app.id=rcr.application
      inner join rc_basic_modules rcbm on rcbm.id=rcm.id
      inner join offline_execution_jobs oej on oej.id=rcm.job_id
      inner join offline_flow_events ofe on oej.id = ofe.job_id
      inner join rc_version rcv on rcr.project=rcv.id
      inner join artifact_version_in_package avpakg on avpakg.artifactPackage_id = rcr.artifact_pacakge
      inner join rc_artifacts rca on rca.id = avpakg.version_id
      inner join artifact_definition ad on ad.id = rca.artifactDefinition