Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

How to manage load scripts in shared apps using GitHub and Qlik Application Automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Emile_Koslowski
Employee
Employee

How to manage load scripts in shared apps using GitHub and Qlik Application Automation

Last Update:

Apr 26, 2023 2:47:02 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jun 14, 2022 11:04:53 AM

Attachments

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".

  1. Configure a new automation to be webhook triggered on every new pull request in the GitHub repo.


    On Pull Request.png

  2. 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. 
      Get File Content.png

  3. 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.
  4. 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.

    Set Load Script.png

  5. Reload & delete the temporary app and evaluate the reload's outcome:
    1. If the reload is successful, set this version of the load script as the shared app's load script and reload the shared app.
    2. If the reload fails, alert your team.

      Reload Outcome Workflow.png

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.

Add Pull Request Review and Merge Pull Request.png

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

Tags (1)
Labels (2)
Version history
Last update:
‎2023-04-26 02:47 AM
Updated by: