qc4vmware
Virtuoso
Virtuoso

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

Jump to solution

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?  

0 Kudos
1 Solution

Accepted Solutions
imtrinity94
Enthusiast
Enthusiast

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

 


Mayank Goyal
vRO Engineer
https://www.linkedin.com/in/mayankgoyal1994/
https://cloudblogger.co.in/

View solution in original post

Tags (1)
11 Replies
imtrinity94
Enthusiast
Enthusiast

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

 


Mayank Goyal
vRO Engineer
https://www.linkedin.com/in/mayankgoyal1994/
https://cloudblogger.co.in/
Tags (1)
qc4vmware
Virtuoso
Virtuoso

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

0 Kudos
qc4vmware
Virtuoso
Virtuoso

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?

0 Kudos
xian_
Expert
Expert

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.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

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/52... 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.

bsaxe
VMware Employee
VMware Employee

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.

xian_
Expert
Expert

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...

0 Kudos
bsaxe
VMware Employee
VMware Employee

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

0 Kudos
xian_
Expert
Expert

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

xian__0-1648195859094.png

 

Tags (1)
0 Kudos
bsaxe
VMware Employee
VMware Employee

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

qc4vmware
Virtuoso
Virtuoso

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

0 Kudos