Giter Site home page Giter Site logo

qudini / concourse-http-jq-resource Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 5.0 46 KB

Exposing version of a resource over a HTTP endpoint and parsing via JQ into Concourse jobs. https://hub.docker.com/r/qudini/concourse-http-jq-resource

License: Apache License 2.0

Dockerfile 10.24% Shell 89.76%
concourse-ci concourse-resources

concourse-http-jq-resource's People

Contributors

mac-adamarczuk avatar mohsen0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

concourse-http-jq-resource's Issues

Thank you

I just used this resource to discover new versions of a rubygem (which seems not to be possible with the rubygems-resource).

My configuration is:

- name: httpspell-gem
  type: http-jq-resource
  source:
    base_url: https://rubygems.org/api/v1/gems/httpspell.json
    jq_filter: "{version: .version}"

Contrary to the documentation, the discovered version is actually available in a get step, so that I can load it as build variable:

- load_var: httpspell-gem-version
  file: httpspell-gem/version
  format: json

and then make use of it as ((.:httpspell-gem-version.version)).

Thanks a lot for this resource, and keep up the good work!

PS: Feel free to close this issue after reading.

Problem with jq query

Hi, hoping you could help with below issue. Following jq query works fine with jq however, getting an issue with the resource.

 - name: golang-http-jq-release
    type: http-jq-resource
    source:
      base_url: https://go.dev/dl/?mode=json
      jq_filter: '.[] | recurse(.files[]?) | select( .os == "linux" and .arch =="amd64") | select(.version|startswith("go1.17")).filename'


--2022-04-20 16:47:32--  https://go.dev/dl/?mode=json
Resolving go.dev... 216.239.36.21, 216.239.32.21, 216.239.34.21, ...
Connecting to go.dev|216.239.36.21|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9703 (9.5K) [application/json]
Saving to: '/tmp/echo-response'

     0K .........                                             100% 2.88M=0.003s

2022-04-20 16:47:32 (2.88 MB/s) - '/tmp/echo-response' saved [9703/9703]

parse error: Invalid numeric literal at line 2, column 0

linux/macos

❯ curl -s 'https://go.dev/dl/?mode=json' | jq '.[] | recurse(.files[]?) | select( .os == "linux" and .arch =="amd64") | select(.version|startswith("go1.17")).filename'
"go1.17.9.linux-amd64.tar.gz"

Cheers!
Marcin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.