fourdollars / http-resource

Concourse CI http-resource to watch and download HTTP URL by curl.

Home Page:https://fourdollars.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub: fourdollars/http-resource License: MIT Bash Docker Docker Pulls

http-resource

Concourse CI's http-resource to watch and download HTTP URL by curl.

Config

Resource Type

resource_types:
- name: http
  type: registry-image
  source:
    repository: fourdollars/http-resource
    tag: latest

or

resource_types:
- name: http
  type: registry-image
  source:
    repository: ghcr.io/fourdollars/http-resource
    tag: latest

Resource

  • url: Required
  • digest: Optional, check 'etag' in HTTP headers by default if HTTP headers contain it or it will download the content to generate the checksum.
resources:
- name: iso
  icon: ubuntu
  type: http
  check_every: 5m
  source:
    url: https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso
    digest: etag
- name: kernels
  icon: penguin
  type: http
  check_every: 5m
  source:
    url: https://kernel.ubuntu.com/~kernel-ppa/mainline/

get step params

  • download: Optional, true or false. False by default.

Job Example

jobs:
- name: check-isoinfo
  plan:
  - get: iso
    params:
      download: true
    trigger: true
  - task: check
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: ubuntu
          tag: latest
      inputs:
        - name: iso
      run:
        path: sh
        args:
        - -exc
        - |
          export DEBIAN_FRONTEND=noninteractive
          apt-get update -q -q
          apt-get install --yes --no-install-recommends genisoimage
          isoinfo -d -i iso/jammy-desktop-amd64.iso
- name: check-kernels
  plan:
  - get: kernels
    params:
      download: true
    trigger: true
  - task: check
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: ubuntu
          tag: latest
      inputs:
        - name: kernels
      run:
        path: sh
        args:
        - -exc
        - |
        grep -o 'href="v[^"]*"' kernels/mainline | grep -o '[0-9][^/]*' | sort -V

About

Concourse CI http-resource to watch and download HTTP URL by curl.

https://fourdollars.github.io/

License:MIT License


Languages

Language:Shell 91.0%Language:Dockerfile 9.0%