Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Automations allow you to set up CI/CD pipelines for your Qlik Sense apps, using the Github connector. Below we showcase various components of a CI/CD pipeline, that can be combined and extended based on your own needs.
You can commit a Qlik Sense app to Github to perform versioning - allowing you to rollback to a previous version if needed - or simply to have a backup of your apps.
The following automation commits the QVF file to Github which can be used to restore the app or to recreate it in a different space, tenant or environment:
We can also commit human readable files to Github that contain all the artefacts of the app (sheets, measures, load script etc.) to allow users to compare versions (doing a "diff") in Github. Here is an example where we loop over all sheets, for each sheet we loop over all objects and we add the json representation to a variable of type "String" (text):
Note that we apply the formula "json" to each object, this will convert the actual object to a json text representation. We are also adding a line break and then we append this text to our variable. Here is the raw view that shows the formula:
Finally we are using the variable to write to a text file on Github:
Note that we have to convert the text of the variable to base64 encoding using the base64 formula. The raw view of the above field mapping is: { base64encode: { $.ObjectString } }
In a similar manner we can commit the load script in a text file on Github:
Same as before, we apply the base64 encode formula on the load script. Here is the raw view of the above field mapping: {base64encode: {$.GetLoadScript.qScript}}
See attached for a full template that commits a wide range of artefacts from a Qlik Sense app to Github.
Here is an example that retrieves a QVF file from Github and uses that to create a Qlik Sense App in your tenant:
You can extend this automation to also update the load script if the imported Qlik Sense App. This is useful e.g. when people collaborated on the load script and merged their changes in Github:
A common CI/CD pipeline practice is to run tests when a new pull request (PR) is opened. Here is a simple example of an automation that is triggered when a new PR is created in Github:
Note that we added a Condition block to the automation. This is needed because Github will emit an event when the PR is opened, but also e.g. when it is closed:
The automation runs a few tests on a Qlik Sense App. In our example we perform following tests:
Finally, the automation adds a comment to the PR with the test results, or it can set the PR to "Approved" using the Github block "Add Pull Request Review":
Hi !
I am curious about the "Restore or re create a QlikSense App from Github".
Do you think is possible to restore a specific version of an app that is in a repository ?
Let's say I have an automation that export apps to Github when they are published. And I published the app sales twice, one in December, but then I made some changes in the script so I published it again in January.
I have the app stored in my GitHub repo, with all the commits. And I want an automation to restore the app that was published in December, not the last version. So to be able to restore versions of a certain app based on a date, month, etc.
Thanks!
Hi, the block "get repository content" which is used to read the app (or any other file) from Github has an optional input called "ref" that can be used to select a certain commit to read the data from. By default this input is empty and the latest version of the file is used. Hope this helps !
The solution you shared is also available for Qlik Sense Enterprise on Windows? or only for Cloud?
Regards
Hi @NikoNelissen-Qlik , hi @Sonja_Bauernfeind
Which can provide Qlik for implementing CI/CD in Qlik Sense Enterprise on Windows? Is there any solution?
Regards
Hello @LDR
Please post your query directly in the appropriate forum. I believe in your case, the query is best suited for the Integration, Extension & API forum. Be as detailed as you can in your description (your use case, how you wish to achieve it, etc), which will help our users and support agents review your request more effectively.
All the best,
Sonja
can i use this for connect o bitbucket?
how do i restore/re-import the dimensions, variables, measures and fields into qlik sense again? Say i have restored the app and also the load script which you have given examples of, but there is no example of how to import the other artefacts using qlik automations
Hello @retretrt
Please post about your query in detail in the Qlik Application Automation forum, where our active users and support agents can better assist you.
All the best,
Sonja
Has anyone found a solution for QVF files that are too large to be uploaded onto GitHub?