VMware Aria Automation Orchestrator

 View Only
Expand all | Collapse all

vRO git repo exclude configuration elements and resource elements. Is this possible?

  • 1.  vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Jan 06, 2022 11:46 PM

    I'm struggling a bit with the best way to back end to git with the provided integration options.  Ideally i'd like to have one repo with branches for dev / test / and prod and merge between them and back to the master as appropriate.  This is what I have setup and it works fine aside from the configuration  elements and resource elements.  In some cases these might be ok to merge back to the master branch but in many cases these values are unique per environment.   I'd rather have separate repositories or create packages for these that I export and keep under source control.

    I don't  see any way of excluding these from being tracked in the git history so I always have to commit when I make a change to a config or resource element.  I'm not sure if configuration elements and resource elements created outside of the gui end up getting tracked in the git history but if so that will probably cause me issues.  I'm curious to hear how others are dealing with this?  Are people still syncing between environments with packages?  Do I need to manually go into git and delete all of the configuration elements I don't want sync'd and stay on top of it.  Does removing them in git end up removing them in vRO once I pull?  



  • 2.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?
    Best Answer

    Posted Jan 17, 2022 10:56 AM

    I think you can use the .gitignore file to mention the files or path you want to ignore. 

    Simply, just create a .gitignore file in the root of your repo branch and list down all the files you want to ignore like

    **/Packages/
    **/Resources/
    **/Configurations/

    this will avoid all the packages, resources and configurations to be committed to the corresponding repo. 

    Also, let's say you have a multi-node vRO and you don't want its workflows to be synced, also add

    **/Workflows/VCO@* 

    This should be enough. If you want to be more precise, The gitignore tutorial is here https://www.atlassian.com/git/tutorials/saving-changes/gitignore

     



  • 3.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Jan 18, 2022 07:19 PM

    Awesome I'll give this a shot!  FIgured it was probably just my git ignorance.  Thanks for the assistance!



  • 4.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Jan 18, 2022 08:00 PM

    So it looks like the .gitignore is working for new files but still tracking the existing files.  Is there a way to remove them from the repo without the removal getting sync'd to the local vRO server or is it easiest to just create a new repo from scratch and make sure the .gitignore is created before doing the first push?



  • 5.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Broadcom Employee
    Posted Feb 07, 2022 05:32 PM

    This is a function of git as you've observed. Once a file is tracked, it cannot be 'un-tracked'. Best bet is to create a fresh repo and populate the .gitignore prior to ever integrating with vRO.



  • 6.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Jan 20, 2022 02:59 PM

    I tried to figure out how to use git with vRO, what is the intended workflow. So far I could only sync everything and did not meet our requirements. The documentation is vague on the topic, at least what I've found.

    We have multiple developers working on dedicated appliances and each of them have different test workflows/actions not meant to go to git or being synced/deleted by git activities. There is no regular pattern on the naming, so I'd prefer an allow list (with the customer content) to an ignore list. Is this possible.

    Please send me any reference if available on the matter, I wish to learn.



  • 7.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Jan 25, 2022 09:21 PM

    Looks like using an exclamation point as the prefix to the pattern means to include a file or directory.  Some talk here https://stackoverflow.com/questions/8006393/force-add-despite-the-gitignore-file and here https://stackoverflow.com/questions/5261959/unignore-subdirectories-of-ignored-directories-in-git/5285539#5285539 I found useful.  So maybe starte with a .gitignore that ignores all and then use the includes?  This is advice from a total git novice but seems like what you want.



  • 8.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Mar 23, 2022 02:42 PM

    Using .gitignore seemed to do the trick but when the repo is pulled, .gitignore file also added to vRO. This resulted in losing version control on ignored objects (in my case I ignored certain workflow folders).

    So ignoring resulted not only in preventing syncing but preventing versioning locally...



  • 9.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Broadcom Employee
    Posted Mar 24, 2022 05:47 PM

    Does it prevent you from just bumping the version manually on the workflow and using "Save" button vs. using "Version" button?



  • 10.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Mar 25, 2022 08:11 AM

    I can increase / save  version manually, but version history is empty:

    xian__0-1648195859094.png

     



  • 11.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Broadcom Employee
    Posted Mar 25, 2022 01:41 PM

    Oh. that is a bummer! I'm out of ideas here.



  • 12.  RE: vRO git repo exclude configuration elements and resource elements. Is this possible?

    Posted Mar 31, 2022 09:27 PM

    That seems like a bug.  I wonder what support will say if you open a case?