Product: PowerShell Universal
Version: 5.4
I have 2 PSU instances that each exist in a separate (Windows/domain) environment:
- Prod
- Dev
The idea is to have 1 repository in Gitlab with 2 main branches :
Masterbranch serves for our PSU instance in the production environmentDevbranch serves for our PSU instance in the Development environment
Each environment has its own characteristics and setup. For instance, I have 2 separate O365 environments. This means that claim for roles, are different in Dev than they are in Prod. More broadly, most of the .Universal folder between Dev and Prod would be different.
.gitignore could be a solution to exclude these files or the entire .universalfolder, but it comes with the following issue.
First, in Dev, I create a branch dev-dashboard2.
Next, in PSU Dev, I create a new application/dashboard named dashboard2.
By doing so , the file .universal\dashboards.ps1 was modified and a new line was added. I write my code, test and eventually I merge dev-dashboard2 with the Dev branch.
Since I want this Dashboard2 now to be available in Production, I would merge branch Dev into Master.
But, since I have excluded the entire .Universalfolder, the dasboards.ps1 does not get merged into Master.
Meaning that only the application code that sits in folder under dashboards gets merged to the prod (master ) branch.
Since thereās no reference to this dashboard/folder in the .universal\dashboards.ps1 file, the application wonāt be visible in the Prod PSU instance.
What Iām asking is, how do you manage 2 instances of PSU with GIT?
Do you have 2 separate repositories? That would mean that at some point, I have to copy-paste the final code from Dev to Prod. It feels like it beats the purpose of versioning ⦠.