Jq: error (at <stdin>:5): Cannot iterate over null (null)

using this resource type:

resource_types:
  - name: artifactory
    type: docker-image
    source:
      repository: pivotalservices/artifactory-resource 

- name: modsp-snapshots
    type: artifactory
    check_every: 1m
    source:
      endpoint: https://devstack.vwgroup.com/artifactory/modsp-snapshots
      repository: "/com/volkswagenag/iportal/modsp/iportal-serviceportal-customer-portlet"
      regex: "iportal-serviceportal-customer-portlet(?<version>.*).war"
      username: ((artifactory_user))
      password: ((artifactory_pwd))
      skip_ssl_verification: true
      
  - name: configuration-snapshots
    type: artifactory
    check_every: 1m
    source:
      endpoint: https://devstack.vwgroup.com/artifactory/modsp-snapshots
      repository: "/configuration"
      regex: "manifest-(?<version>.*).yml"
      username: ((artifactory_user))
      password: ((artifactory_pwd))
      skip_ssl_verification: true
    

now, in a particular task,
proccess-configuration

when I used,
- aggregate:
          - put: configuration-snapshots
            params: {file: ./manifest-files/qa_1/manifest-*.yml} 
            get_params: 
              skip_download: true
              folder: qa_1
            
          - put: configuration-snapshots
            params:  
              file: ./manifest-files/qa_2/manifest-*.yml
              folder: qa_2
            get_params: {skip_download: false}

" When the  `put`  succeeds, the produced version of the resource will be immediately fetched via an implicit [ `get`  step](https://concourse-ci.org/get-step.html)"

according to this statement,and taking the attached image as reference; the error you will be able to see.

need directions on:
1.what could be the json file on which  'jq' is applying.

The jq error is happening inside the pivotalservices/artifactory-resource so it is probably best raised as a potential issue against that repo (although it seems kind of abandoned). If I had to guess what jq was failing on though, it would be parsing the get params - they are passed to the resource’s in script as a JSON blob so it is pretty common for a resource to use jq to get the parameters out of that blob.

In my experience though, I’ve tried, failed and got quite frustrated trying to use that resource type and instead just ended up using springio/artifactory-resource as that actually worked better. I realise this doesn’t help fix your exact issue but it might at least provide an alternative route!

1 Like

hi @andy.paine,
I tried with spring-io/artifactory-resource :
end up with
Failed to pull image spring-io/artifactory-resource@sha256:0c4be8815618cd33e90b212dd6d4fa678ac7edd0ac3d41a4ff2627c96f7d75a6.

resource script ‘/opt/resource/in [/tmp/build/get]’ failed: exit status 1

I think the image is springio not spring-io :slight_smile: https://github.com/spring-io/artifactory-resource#configuration for reference

hey @andy.paine, its the same again,
Failed to pull image springio/artifactory-resource@sha256:0c4be8815618cd33e90b212dd6d4fa678ac7edd0ac3d41a4ff2627c96f7d75a6.

resource script ‘/opt/resource/in [/tmp/build/get]’ failed: exit status 1

@andy.paine,
the one more major difference , which I have seen is SIZE:
pivotalservices/artifactory-resource:0c4be8815618,linux/amd64,7.89 MB
springio/artifactory-resource=495507bccaae,linux/amd64,108.38 MB

so what do you suggest, from my side, I suggest to write a docker file and store in our artifactory and pull it.

I’m not sure where that 0c4be digest is coming from - it might be worth specifying a tag:

resource_types:
  - name: artifactory
    type: docker-image
    source:
      repository: springio/artifactory-resource
      tag: 0.0.10

This is assuming you have access to Docker Hub from your Concourse? You may have to mirror the image in some way if that isn’t the case.

@andy.paine i have used tag as ${releaseVersion}.

for the

resource script '/opt/resource/in [/tmp/build/get]' failed: exit status 1

error what could be the possible troubleshoots @andy.paine @amar930 @austinbv

Is this error from pulling the resource type or the resource?

most probably from resource type.

I’m not so sure. I didn’t think resource_type errors were exposed in the UI. Also resource_types don’t have in scripts afaik - they’re just docker pulls. Can you post the pipeline you’re trying to run (at least the job + any resources/resource_types it uses)?

Did you figure out what was wrong @Abhinay? Sorry I didn’t have time this week to take a look.

@crsimmons , now the springio artifactory resource is pulled and the current pipeline tags are being changed according to springio and working in progress, and we stuck at giving the repo details correctly in the pipeline

I also found it a bit tricky to configure - make sure your URL includes any /path based components too - if you are using hosted Artifactory it should look something like https://yourcompany.jfrog.io/yourcompany

EDIT: Just saw your example config above - have you tried https://devstack.vwgroup.com/artifactory for the URL - omitting the repo from the end

The build name I found by going to an example artifact in the Artifactory UI and clicking on the Builds tab then pulling it from there. Good luck!