https://github.com/fourdollars/http-resource
Concourse CI http-resource to watch and download HTTP URL by curl.
https://github.com/fourdollars/http-resource
concourse-ci-resource
Last synced: 27 days ago
JSON representation
Concourse CI http-resource to watch and download HTTP URL by curl.
- Host: GitHub
- URL: https://github.com/fourdollars/http-resource
- Owner: fourdollars
- License: mit
- Created: 2022-03-26T09:30:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T04:58:02.000Z (9 months ago)
- Last Synced: 2025-02-12T18:43:21.941Z (3 months ago)
- Topics: concourse-ci-resource
- Language: Shell
- Homepage: https://fourdollars.github.io/
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fourdollars/http-resource/) [](https://opensource.org/licenses/MIT) [](https://www.gnu.org/software/bash/)  [](https://hub.docker.com/r/fourdollars/http-resource/)
# http-resource
[Concourse CI](https://concourse-ci.org/)'s http-resource to watch and download HTTP URL by curl.## Config
### Resource Type
```yaml
resource_types:
- name: http
type: registry-image
source:
repository: fourdollars/http-resource
tag: latest
```or
```yaml
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.```yaml
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
```yaml
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
```