How to handle multiple deployments using Branches for Source Control in Scoped Application

Akshatha Balla1
Tera Contributor

Hello,

I'm fairly new to scoped application development, so please excuse me if I'm missing something basic. My understanding of scoped application is that the release to the next instances happen via publish to the Application repository and we commit changes to the External Repo (GitHub) via source control for back up. 

There's an application in my company that has several versions and it was being worked upon by only one person. Now, for the enhancement of the same, two more developers are coming into picture. The changes made by each developer has no relation to each other's codes (Dev A may have completed his work but dev B and C may still be WIP) Now we need to move the code of Dev A across instances. 

If we publish the app to the repository at this stage, the unfinished work of B and C would also be published. What is the effective way of moving only Dev A's code across instances?

PS: I looked into branching as mentioned in https://developer.servicenow.com/dev.do#!/learn/learning-plans/rome/new_to_servicenow/app_store_learnv2_devenvironment_rome_source_control_branches and while it maintains the code separately from the whole application and we can later merge it to master file in the repository, how do we move the code across instances?

I have tested by importing the master file from source control(GitHub) in the QA instance ( import from Source Control) and it addresses all of my problems but I'm afraid that's not how we move the code for scoped app.

Also, the branch seems to have a limitation where in one instance only one branch can be the current one, not different branches for different developers.

Any input on this is highly appreciated.

 

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @Akshatha Ballal 

unfortunately you misunderstood something.

You ONLY connect your DEV instance with a Git Repositoy. Never, really never connect all the following instances with the same Git Repo as this can cause irreversible damages!

From DEV there are the only two ways of deploying to the next stage: via Update Sets (not recommended) and via Application Repository.

And regarding Git you should know that ServiceNow does not support working on different branches in parallel. That means you can only work on one version/branch at the same time.

Kind regards
Maik

View solution in original post

17 REPLIES 17

Hi @Daniel.Draes

Any update on this whitepaper and where I can find it? I'm looking for an official documentation on this process.

Unfortunately this is still stuck in internal review loops. I will let you know once we have it finally ready.

If you want, you may reach out to our account/partner manager and ask to get in contact with us. We can walk you through it in its current state.

As far as I know, importing from a Git repository will remove all data in the app and reinstall it. Did that change at some point? It would be a reason to only connect DEV to Git. The Application Development Fundamentals raining makes no mention of connecting any instance other than DEV to GIT (but I must admit: I am struggling a bit to find a good use of connecting to GIT myself)

Yes, this did change some while ago. Need to check release notes, but at least since Quebec:
Delta loading (servicenow.com)

Hi @Daniel Draes do you have any updates on the white-paper? We're going through the same journey and want to connect multiple development instances to multiple branches of source control, and is looking to see if there are some best practice around automating the pull requests and keeping the development instances up to date with the latest changes