Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
is there a way to get all files from a given gitlab repository and store them in a dedicated space ?
Thanks a lot for some advise.
Hi @xyz_1011
I have done this by configuring the automation to listen "On Merge Request" webhook event in Gitlab, add a condition block to check if the created source branch has been merged to the main branch, and if merged get the content of the file and use "Set Load Script" block from Qlik Cloud Services connector to update the loadscript of Qlik Sense app.
We already have a template called "Set load script in Qlik Sense app from merged GitHub pull request" which you can refer to and replace the GitHub blocks with GitLab blocks.
I have also created simple demo automation for your reference.
Thanks
Hello,
It seems like currently what is available in QAA is the "Get File from Repository" but that is for a single file, it requires a project id, branch, and file path.
Another option is perhaps to use the "Raw API List Request" block to make a request to "list repository tree" endpoint for git labs api.
I didnt dabble with this connector much, but this is what i could find.
Note that the response is just some information in regard to the files, not the files themselves.
I hope it helps.
Thanks @Shai_E
Would you know if i can embedd the „Get File from Repository“ in a loop to go through an array of file paths that my preceeding „on Push event“ might return ?
Indeed i need to get the files themselves into my tenant. Not just their meta data. Any idea how that could be done ?
Thanks!
Hi @xyz_1011
Yes, I think that would work.
If I understand correctly you have a list of repository files retrieved using the "Raw API List Request" block, and you need more information about the file in the repository which can be achieved using the "Get File from Repository" block within the loop of "Raw API List Request" block and specifying the file path to the file
Hope this helps
Thanks
Hi @AfeefaTk Thanks a lot for your reply. What i am really after, is getting all relevant files (in the sense of being updated, deleted or added) from my gitlab repository into my tenant (stored in a given space). And i do need the file - not the description of the file. As i am still new to QAA would you maybe be able to share some template workflow that would be able to do what i am after ?
Background: I am using QVS files that include my scripts. My apps read them via an include statement. These QVS files are all stored in my gitlab repository. I am looking for an automated way to get these files into my tenant everytime they are being updated (basically after every 'git push' event).
Not sure, if QAA is the only way to approach this, but i havent found anything else yet.
Thanks again for your help!
Hi @xyz_1011
We have a template called "Commit an app to GitHub" which performs Qlik Sense app version control on GitHub
More information can be found here
Could you please try using the same approach with GitLab connector and see if that works?
You can refer to GitLab Getting Started Article
Please let me know if you are facing any further difficulties
Thanks
Hi @xyz_1011
Sorry, I misread your comment
It seems you need to get the files from Gitlab and import these files to the Qlik Sense tenant.
You can see the template "Import an app from GitHub" which creates an app based on the GitHub file.
Could you please try the same using Gitlab?
Thanks
Hey @AfeefaTk ,
thanks for the tip, however, i do not want to import an app from gitlab. What i want is to get the content of a QVS file which resides in gitlab and eventually use this QVS file's content as a LOAD script in an app...
Thanks for some more advise 🙂
Hi @xyz_1011
I have done this by configuring the automation to listen "On Merge Request" webhook event in Gitlab, add a condition block to check if the created source branch has been merged to the main branch, and if merged get the content of the file and use "Set Load Script" block from Qlik Cloud Services connector to update the loadscript of Qlik Sense app.
We already have a template called "Set load script in Qlik Sense app from merged GitHub pull request" which you can refer to and replace the GitHub blocks with GitLab blocks.
I have also created simple demo automation for your reference.
Thanks