This article explains how an automation can be built that'll use GitHub to manage load scripts from shared apps.
Before you begin, you'll need the following:
- Qlik Sense app in a shared space
- GitHub repository with a copy of the shared app's load script as a text file
Steps:
The following steps describe how to build the demo automation. You can also find an exported version of this automation attached to this article as "Shared-app-load-script-management.json".
- Configure a new automation to be webhook triggered on every new pull request in the GitHub repo.
- Get the load script from the file. In this example, there's only one file so the first file from the List Pull Request Files block is used. If you have multiple files, use the Lookup Item In List block to find a specific file.
- Use the Get App Information block to get basic info about the shared app. The app ID returned by this block can then be used in other blocks so we don't have to configure this in multiple places.
- Create a new (temporary) app and set the load script from the pull request as this app's load script. When retrieving files from GitHub, they're base64 encoded by default. Use the Base64 Decode formula from the formula picker to decode the file's content before setting the load script.
- Reload & delete the temporary app and evaluate the reload's outcome:
- If the reload is successful, set this version of the load script as the shared app's load script and reload the shared app.
- If the reload fails, alert your team.
Bonus: you can use the blocks Add Pull Request Review and Merge Pull Request blocks to approve and merge the pull request if the reload succeeded.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
Related Content
How to get started with GitHub in Qlik Application Automation
CI/CD pipelines for Qlik Sense apps and Qlik Application Automation