Configure Continuous Integration To Ignore Content

Dan Copping asked on July 24, 2019 04:04

Hello, We are trying to configure continuous integration to track changes to types but ignore content. From your own documentation (https://docs.kentico.com/k12/developing-websites/setting-up-continuous-integration/excluding-objects-from-continuous-integration) this should be possible by specifying the 'IncludedObjectTypes'. I have experimented with this by adding the following in the repository.config

  <IncludedObjectTypes>
<!-- <ObjectType>ObjectTypeA</ObjectType> -->
<objecttype>cms.documenttype</objecttype>
<objecttype>cms.allowedchildclass</objecttype>
<objecttype>cms.classpermission</objecttype>
<objecttype>cms.classsite</objecttype>
<objecttype>cms.documenttypescope</objecttype>
<objecttype>cms.pagetemplate</objecttype>
<objecttype>cms.pagetemplatecategory</objecttype>
<objecttype>cms.pagetemplateconfiguration</objecttype>
<objecttype>cms.macrorule</objecttype>
<objecttype>cms.macroidentity</objecttype>  

In turn, I have configured our git repository to ignore (using .gitignore) all other CI files.

When we run the continuousintegration.exe on the production server, it attempts to remove all the files that are not referenced / 'included'.

What am I missing here?

Thanks in advance Dan

Correct Answer

Brenden Kehren answered on July 24, 2019 04:28

If you look at the linked documentation to see what objects CI supports.

If you want to exclude content or an object, you have to specify that by using the node <ExcludedObjectTypes> and add cms.document to the list.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Dan Copping answered on July 24, 2019 08:24 (last edited on July 24, 2019 08:25)

Hi Brenden, thanks for your prompt response. Yes, I believe we can work with adding 'cms.document' as an 'ExcludedObjectType'. This now seems to ignore 'content'. I was confused by this because I was expecting that by adding 'Excluded' and 'Included' object types I would be defining what nodes would be tracked in. If I define these as 'excluded', I still need to leave their associated XML files in the repository or the continuousintegration.exe tries to delete their (unchanged) values from the database.

0 votesVote for this answer Mark as a Correct answer

Mike Wills answered on July 24, 2019 17:23

Hi Dan,

If the repository.config file is setup correctly, Continuous Integration should no longer create the XML files for documents. Have you tried clicking Serialize all objects after making configuration changes? That would clean up the XML files for excluded objects.

Mike

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.