Release Automation

  • 1.  Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-22-2016 03:04 AM

    Hi everyone,

     

    as mentioned in this idea: Delete Nolio Environments & Process Tags , we're currently not able to delete process tags if there are still "active" plans that are using this tag.

     

    my question now is, is there a way to archive more then one plan at a time?

     

    I'm looking for example at something like to archive everything older than a specific date or even better, find exactly the plans that are still using the tag we want to delete (would need to check the db tables if the deployment steps and tags of a plan are in there somewhere).

     

    From my current understanding this would only be possible by manipulating the database itself, therefore I would need to know, which tables need to be changed, when archiving a plan, is it enough to just switch the archive flag in the "rc_release_candidate" table or is there more to it?

     

    If this is not possible we would need to manually remove hundreds of plans, which is just ridiculous.

     

    thanks

    michael



  • 2.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-22-2016 05:52 AM

    does anyone have an idea where I can find the processes used by a deployment plan in the database?

     

    I really would like to be able to get all the deployment plans that uses a specific process (by name and tag)



  • 3.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 01:27 AM

    no one an idea?

     

    Jacky_Mahadab have you at least some hints regarding the database stuff?



  • 4.  Re: Archive multiple Deployment Plans to be able to delete process tag
    Best Answer

    Posted 02-23-2016 07:25 AM

    Hi

    Please try the following DB query (I used it on MySQL) to search for Deployment plans that use the process+tag in the pre/deploy/post steps

    use nolio_db55;

    select rcrc.name as PlanName, rcrc.build as PlanVersion, c.PROCESS_NAME as ProcessName, s.TAG_NAME as ProcessTag from rc_release_candidate as rcrc

       inner join rc_rc_module rcrcm on rcrcm.release_candidate_id=rcrc.id

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

      inner join published_process s on s.ID=rcbm.published_process

      inner join process_container c on c.ID=s.ID

    where c.PROCESS_NAME like 'Dynamic PrePlan'  AND s.TAG_NAME like '2.0'

     

     

     

    Let me know if this help

    Thanks

    Jacky



  • 5.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 07:32 AM

    thanks jacky!!! this is exactly what I was looking for or at least it will be the base of my update query. nowI just need to get the project in there as well (but thats easy going, now that I have the plan id), and I'm good to go.

     

    and also my research pointed out, that it really should be enough to just switch the archived flag in the rc_release_candidate table to 1, right?



  • 6.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 07:36 AM

    I didn't try it so can't said if this is the only thing that need to be modified



  • 7.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 07:39 AM

    I did found it in another thread in here by Gregg, where he pointed out how to get a deleted application/project back and there he said to "unarchive" a plan, the archived flag needs to be switched to 0, so I assume this is the only thing needed



  • 8.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 08:19 AM

    hey jacky,

     

    any chance I can do a search for the preplan process and tag as well?

     

    It appears that this is not working as it is not part of the rc_rc_module table

     

    thanks again for your great help.

     

    michael



  • 9.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-23-2016 10:23 AM

    The process that run in the pre plan is not part of the deployment plan so its not bind to the deployment plan id , also if the process is only used in pre plan that finished you probably can remove it



  • 10.  Re: Archive multiple Deployment Plans to be able to delete process tag

    Posted 02-24-2016 01:08 AM

    ah ok, didn't know that this process isn't bind to the plan, I thought it is, as it runs after the creation.

     

    and yes, if the preplan is renewed I sure need new plans, but still, if we would have 3 tags, where one is the new one, the second is the one that has been used for the last couple weeks and the third one is obsolete, we don't want to delete all previous plans, as some might still be needed for deployments on production, so we would only delete the obsolete one. but yeah, as I'm thinking about, I can simply check when I created the second tag an can archive every plan before that date :-)