Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

Qlik Application Automation:Set load script in Qlik Sense app from merged GitHub pull request

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
AfeefaTk
Support
Support

Qlik Application Automation:Set load script in Qlik Sense app from merged GitHub pull request

Last Update:

Apr 25, 2023 7:59:34 AM

Updated By:

AfeefaTk

Created date:

Aug 4, 2022 4:36:51 AM

Attachments

This article gives an overview of setting the load script of the Qlik Sense target app when the GitHub pull request is merged to the main branch using Qlik Application Automation. It explains a basic example of a template configured in Qlik Application Automation for this scenario

A template is available in the Qlik Application Automation template picker. 

  1. From the Qlik Cloud hub, select Add New 
  2. Click New automation

    new automation.png

  3. Search for Set load script in Qlik Sense app from merged GitHub pull request in the search bar
  4. Click Use template 

    set-load-script-template.png

 

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 "Set-Qlik-sense-app-load-script-from-merged-GitHub-pull-request.json".

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

    On-new-pull-request.png

  2. Add a condition block to check whether the pull request was merged and stop automation if the pull request was not merged.

    condition-block-pull-request-merged.png

  3. 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-get-app-info.png

  4. 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.
  5. Set the load script from the pull request as the target 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-block.png


  6. Reload the target app with this new load script and alert your team via slack that the load script of the target app was updated

A JSON file containing the above automation is attached to this article.

Please follow the steps provided in How to import  automation from a JSON file  article to import the automation.

Related Content 

Manage load scripts in shared apps using GitHub and Qlik Application Automation
How to get started with GitHub in Qlik Application Automation
CI/CD pipelines for Qlik Sense apps and Qlik Application Automation

Labels (2)
Version history
Last update:
‎2023-04-25 07:59 AM
Updated by: