Release Automation

 View Only
  • 1.  How to delete  Artifact Type and it  Artifact Definition(s) References(RA v6.5)?

    Posted Sep 30, 2017 03:26 PM

    1. Created  the Artifact Type : ABC-ABC.DEF

    2. Added Artifact definitions like Build and Config

    3. Our Jenkins build added some Build files under the Artifact definitions

     

    When we tried to deploy, it failed as it was looking for Artifact Type name format like ABC-Abc.Def (case sensitive) instead of ABC-ABC.DEF.

     

    So we deleted the artifact Type and artifact definitions from ROC. and try to add the new artifact type ABC-Abc.Def.

     

    But it does not allow us to create with the  name ABC-Abc.Def and said already exist as below.

     

     

    We followed the below article for deleting from the database

    Release Automation KB: Delete Artifact Types and Definitions  .

     

    But we could not delete artifact_type and artifact_definition and we get the below Error.(REFERENCE constraint Error)

     

    Need help on how to remove this Artifact Type very safely in this scenario ?

     

    Msg 547, Level 16, State 0, Line 1

    The DELETE statement conflicted with the REFERENCE constraint "FKA85A0DE075A7A68B". The conflict occurred in database "Nolio_DB", table "dbo.artifact_definition", column 'artifactType_id'.

    The statement has been terminated.

      

    Msg 547, Level 16, State 0, Line 1

    The DELETE statement conflicted with the REFERENCE constraint "FKCA4C74531FDE38DB". The conflict occurred in database "Nolio_DB", table "dbo.rc_artifacts", column 'artifactDefinition'.

    The statement has been terminated.

     

     

     



  • 2.  Re: How to delete  Artifact Type and it  Artifact Definition(s) References(RA v6.5)?
    Best Answer

    Broadcom Employee
    Posted Oct 02, 2017 04:12 AM

    Hi,

     

    FKCA4C74531FDE38DB means that the artifact already used for deployments, so it cannot be deleted from database per product design.

    Delete function on ROC can change record status to inactive, but not remove the record actually.

    Additionally, it seems your database was configured as "Case Insensitive" by default.So, you cannot create new artifact with "ABC-Abc.Def".

    This is not supported query, so I'm not sure impact to existed definitions and deployments. I recommend to take full backup before run query..

     

    update artifact_type set name='ABC-Abc.Def' where name='ABC-ABC.DEF'

     

    I hope this info helps you.

    Regards

    Yas



  • 3.  Re: How to delete  Artifact Type and it  Artifact Definition(s) References(RA v6.5)?

    Posted Oct 02, 2017 02:04 PM

    Hi Yasuyuki-san,

     

    Thanks a Million for your support.

     

    Actually I did work around for this issue by adding one more additional Artifact type and its parameter for this issue. the same i used in my actions and flow.

     

    However your reply is very useful and it is working fine and i can use easily for not deployed scenario.

    (I don't know this may work for deployed scenario as well but I am not sure)

    Steps indetail:

    ROC Artifact Type Name ABC-ABC.CDE  and added sub parameter and added versions.

     

    Now I need to change this to ABC-ABC.CDE to ABC.CDE

     

    1.Login to  SQL Data base list artifact type and match it.

     

     

    2. Type the query carefully and change the string to needed.

    3. Refresh ROC and see the Value.



  • 4.  Re: How to delete  Artifact Type and it  Artifact Definition(s) References(RA v6.5)?

    Posted Oct 02, 2017 02:20 PM

    If delete Artifact Type Name from ROC then this will not work. Only updating we can use.



  • 5.  Re: How to delete  Artifact Type and it  Artifact Definition(s) References(RA v6.5)?

    Broadcom Employee
    Posted Oct 02, 2017 09:44 PM

    HI Mohanraj-san,

     

    Thanks for your verification.

    After delete artifact type from ROC, "archived" flag of the record in database will be ON. It means the record is invisible on ROC.

     

    Regards

    Yas