Stefan Cronje · Jan 13, 2021

CI/CD Using GitHub and Travis CI - Source to Cache XML Format


I am investigating creating builds from TravisCI, which will pull the source from github.
This will also involve a code review process, pull request, etc.

It will be done in Multiple phases. The first one will not involve automated testing using TravisCI yet. It will only involve travisCI pulling the latest code from github and creating a release for testing(A deployment file in a format that can be loaded by Ensemble0)

What I want to know is: Is there a way or tool available to take the source files and create an XML file which can be used for deployment to Ensemble?

Kind regards,

Product version: 
Ensemble 2018.1
1 0 8 33


In short, you can do almost everything if you could code it. I would recommend using Docker's way of achieving this. It's not as easy to recommend something specifically, it mostly depends on what you already have, and what exactly you are going to achieve.

It is not as straightforward as a Docker's solution. Even if using a container, the code will need to be pulled from github and loaded into Cache/Ensemble/IRIS. r

In the multi-developer environment, with multiple packages in different repositories, and projects using their own repos with dependencies on the packages from other repos, it is necessary to be able to take the "raw" source from github and importing it. The only way I know of importing code, is using the XML format.

The simplest will be if Cache/Ensemble/IRIS had a tool to create an XML in the correct format from the source files.
Another more difficult way is to write code that uses the code api in Cache to load the code and then export it to XML.
This is a lot of work with possible defects that will slow the process down. The idea behind tools like github and TravisCI, is to make work less, not more.

I think in order to make CI/CD with real-world SDLC processes and source control easier to utilise, that a tool like this should come standard with the IS products. If there is already a way which I do not know of, it will be great. If not, this is quite a short-fall in the product that canv run containerised and promotes CI/CD.

Have you seen ZPM? ZPM can be used to pack your code libraries in packages, put them in your registry and install them as one line where you need them programmatically obeying dependencies, running tests and performing install scripts.

Since 2016.2, you can use UDL format as well, it's a format as visible in any editor. It can be used for import and for export. XML still supported as well, both ways. So, no issues at all in format.

It's not so easy to say how to deal with multiple packages/repos, with no full picture. But see no issues, if doing it in a right way.

Having code in GitHub, you can use GitHub Actions as well, and it will work too.

Hi Stefan! Why would you want to import code in XML form?

IRIS and I bet Ensemble too can load it from CLS as well using $System.OBJ.%ImportDir()

So you can load CLS source files directly from the folder with no need to transform it to XML first. 

 Is there a way or tool available to take the source files and create an XML file which can be used for deployment to Ensemble? 

docs & details

This works on Caché/Ensemble not just IRIS

Thank you for the answers.

I've only used the XML format up to now, where we create builds by exporting projects to XML and then import. The OBJ Load seems like it is what I need.

Thank you again.

Speaking about automation with Github - if you use GitHub to host the code maybe it makes sense to consider Github Actions vs TravisCI for automation.

There are numerous examples how to use Github Actions to test and deploy to cloud/kubernetes solutions built with InterSystems technology.

E.g. check this repo - which has two automation scripts: one for Kubernetes deployment and another for automatic static code control.

Every push to the master branch triggers the deployment to Kubernetes and the test of the codebase.