Continuing the TM1 Git story, I’ll describe how to do a simple promotion of a few objects from one server to another.
This might be slightly different from overall Git-enabled philosophy of development, but it’s a direct replacement of how TM1 promotions work in most places I see now, i.e. promoting via copying the object files to a folder and carrying it over and it’s sometimes easier to start from doing the same thing with a new tool :)
Just to re-cap, you’d want to switch the tried and trusted ' stop the server / copy object files / start the server’ approach to Git promotions for following benefits:
So let’s say we got 2 servers (I’m using Planning Sample from standard samples):
and we want to promote:
from development to the UAT environment. We only want to promote the specified objects, not all changed objects between environments, because maybe there’s a lot of things happening in the development and a lot of changes that are not yet ready to be promoted. If you create a ‘per-environment’ branch in Git, comparing dev & testing branches allows you to identify changes.
I’ll do the following for promotion:
I’ll be using PostMan for Rest API calls in the post instead of VSCode as in last one for no particular reason other than trying them both :) All the requests I’m running can be downloaded as a PostMan collection here, import it like this.
Ok, so here are our 2 servers:
To push the changes, I’d need to update the tm1project definition of the dev server to ‘exclude all objects’ and ‘include’ only the ones we’re promoting.
Step by step promotion process:
{
"Version": "1.0",
"Ignore": [
"Cubes/Views",
"Cubes",
"Dimensions",
"Processes",
"!Cubes('plan_Report')",
"!Processes('plan_set_language')"
]
}
3. Once it’s set, we do a Git Push to a new branch called change-XYZ from the base branch of dev and with a comment. Note how the source files reflect only the cube we included:
4. And execute the push plan:
5. Now I’ll see these objects on GitHub in a new branch:
Let’s do a pull on UAT side: