Documentation needed: How to work with multiple (patch) orgs and branches in single IC2 project
I am a developer from a Salesforce ISV with multiple managed packaged. I recently switched from Eclipse and can't get this use case to work with IDEA and IC2.
In Eclipse I had a project for the packaging org (reflected the trunk of my Github product repo) and n other projects for the different patch orgs of the same product. Each patch project was connected to a Github branch of the product repo.
I had all those projects in a per product Workset in Eclipse so I could easily work in the trunk, compare it to patches, merge code and the like.
After talking to Scott from IC2 I heard that are features to allow that even better but I couldn't get it to run. I think thats to complex to figure it out by clicking around so I would like a detailed documentation or even better a decently detailed video.
Comments (4)
-
repo owner -
Account Deleted reporter I made a small video recording on how I used to work in Eclipse. Maybe you get a better feeling of the difference by watching it.
-
repo owner Thanks, Robert. I'll take a look and either document how the same process would work in IC or, if that's not possible, think about how to streamline the IC process.
-
repo owner - changed status to resolved
Issue tracker grooming.
- Log in to comment
I'll add some quick thoughts here, but I do plan to provide more first-class documentation (likely in the form of HOWTOs) for things like this.
When working with multiple branches and/or orgs against what is effectively the same code base, you can use a combination of IntelliJ/WebStorm and IC features to achieve what (I think) you want. I'll use Git for the sake of example here, but the same concepts should apply to any supported version control system in IntelliJ/WebStorm.
Let's assume for a moment that you typically release software out of the
master
branch. Your developers create transient feature branches for their work, and you may also create more lasting branches for patch releases. Each branch is associated with a distinct organization. For example,master
may be associated with a sandbox, production, or packaging org. Each developer feature branch is associated with that developer's personal DE org. Patch release branches are associated with patch orgs.In IC, orgs are modeled as connections, so that means that you have multiple configured con,nections. You select a single connection for each IC module in a project, and IC generates an OST for each connection that you use.
So now let's make this concrete. When working with the
master
branch, I configure IC for a connection calledpackaging
which has the credentials of the official packaging org. When working on features, I configure IC for a connection calleddev
which has the credentials of my DE org. When working on a patch release, I configure IC for a connection calledpatch<version>
which has the credentials of the patch org from which I'll release patch <version>.Note that IntelliJ/WebStorm and IC config files can be checked into VCS, and there's actually a huge benefit to doing so. You can find details in the FAQ under Can I manage the IDE project files in version control? Which files should or should not be checked in?.
This is important because when I'm working in
master
and have configured IC for thepackaging
connection, I have an OST underIlluminatedCloud/packaging/OfflineSymbolTable.zip
. Similar with other branches and their specified connections. If I check in the IDE/IC config files and the OST on each branch, as I switch back and forth between branches things update correctly. There's no need to switch connections or generate an OST after switching to a given branch. Note that even if you don't check in OSTs, this will work. You'll just end up with multipleIlluminatedCloud/<connectionName>/OfflineSymbolTable.zip
entries, one per-connection.IntelliJ/WebStorm makes it very easy to compare the contents of branches. Here's how you do it in Git, but JetBrains' docs also show how to do it in other supported VCSs.
Similarly, if you'd like to compare your local project metadata with the contents of another org, start a Retrieve Metadata action, select the desired connection in the Connection drop-down, and click Retrieve for Merge. IC will pull the requested metadata from the specified org into a temporary location and open the directory comparison tool against the project metadata for comparison.
I think I'll take a break and see if this helps to answer your question. We can iterate a bit based on follow-on questions, and once we have a good explanation, I'll move this into the FAQ until I can produce the aforementioned HOWTOs.