Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
linnakry
Partner - Contributor III
Partner - Contributor III

Integrate Qlik Cli with Gitlab CI

Hi Qlik Community,  #QlikCli

I was wondering if anyone has integrated Qlik Cli with Gitlab CI. 

I have integrated Qlik CLI with Gitlab CI and have met with several problems. One is that I am unable to import app using 

qlik app import -f app.qvf

The error seem to be that in gitlab ci, the content-length is not being updated. 

They both runs on the same network with same file system rights. As you can see below, the difference between the request in Gitlab and local is the content-length.

Result from GitLab Ci

qlik app import -f ./testapp.qvf --verbose
Server-type not set, guessing "cloud"
POST https://hostname.qlikcloud.com/api/v1/temp-contents?filename=app_upload_%20%20%20%20%20%20999316

Authorization: Bearer omitted
Content-Type: application/octet-stream
Referer: https://hostname.qlikcloud.com
User-Agent: qlik/2.6.0 (linux)
< Cache-Control: no-store
< Connection: keep-alive
< Content-Length: 0
< Date: Fri, 26 Nov 2021 13:40:09 GMT
< Location: /v1/temp-contents/61a0e3b924cb4200018dd773
< Pragma: no-cache
< Strict-Transport-Security: max-age=15724800; includeSubDomains
Response time: 10s
Status: 201 Created
Empty response body
POST https://hostname.qlikcloud.com/api/v1/apps/import?fileId=61a0e3b924cb4200018dd773
Authorization: Bearer omitted
Content-Type: application/octet-stream
Referer: https://hostname.qlikcloud.com
User-Agent: qlik/2.6.0 (linux)
< Cache-Control: no-store
< Connection: keep-alive
< Content-Length: 0
< Date: Fri, 26 Nov 2021 13:40:09 GMT
< Pragma: no-cache
< Strict-Transport-Security: max-age=15724800; includeSubDomains
Response time: 345ms
Status: 404 Not Found
Error: 404 - Not Found (empty response)

Result from Local Executable

qlik app import -f ./testapp.qvf --verbose
Server-type not set, guessing "cloud"
POST https://hostname.qlikcloud.com/api/v1/temp-contents?filename=app_upload_%20%20%20%20%20%20685844

Authorization: Bearer omitted
> Content-Length: 720896
Content-Type: application/octet-stream
Referer: https://hostname.qlikcloud.com
User-Agent: qlik/2.6.0 (linux)
< Cache-Control: no-store
< Connection: keep-alive
< Content-Length: 0
< Date: Fri, 26 Nov 2021 13:38:08 GMT
< Location: /v1/temp-contents/61a0e3403a254b00018081df
< Pragma: no-cache
< Strict-Transport-Security: max-age=15724800; includeSubDomains
Response time: 10s
Status: 201 Created
Empty response body
POST https://hostname.qlikcloud.com/api/v1/apps/import?fileId=61a0e3403a254b00018081df
Authorization: Bearer omitted
Content-Type: application/octet-stream
Referer: https://hostname.qlikcloud.com
User-Agent: qlik/2.6.0 (linux)
< Cache-Control: no-store
< Connection: keep-alive
< Content-Length: 1061
< Content-Type: application/json; charset=UTF-8
< Date: Fri, 26 Nov 2021 13:38:09 GMT
< Pragma: no-cache
< Strict-Transport-Security: max-age=15724800; includeSubDomains
Response time: 1070ms
Status: 200 OK
{
"attributes": {
"_resourcetype": "app",
...}

Labels (1)
  • SaaS

1 Reply
linnakry
Partner - Contributor III
Partner - Contributor III
Author

Workaround

do this 

cat ./app.qvf | qlik app import