The `oci-build-task` seems to be doing more requests to the registry than local `docker build`, which frequently results in Docker Hub's rate limits kicking in. By proxying `docker.io`, this should hopefully be avoided. A somewhat elaborate setup and a custom build of `oci-build-task` are needed: https://github.com/concourse/oci-build-task/pull/121. Fixes: #39.
61 lines
1.4 KiB
Django/Jinja
61 lines
1.4 KiB
Django/Jinja
{%- import 'jobs/simple-image.yml.j2' as simple_image %}
|
|
{%- macro simple_image_resource(name) -%}
|
|
- name: status-{{name}}
|
|
type: gitea-status
|
|
source:
|
|
access_token: ((forgejo_api_key))
|
|
url: ((forgejo_url))
|
|
owner: ((repo_owner))
|
|
repo: ((repo_name))
|
|
type: generic
|
|
context: build/{{name}}
|
|
description: Building image {{name}}
|
|
|
|
- name: image-{{ name }}
|
|
type: registry-image
|
|
icon: docker
|
|
source:
|
|
repository: "((registry_url))/{{ name }}"
|
|
tag: latest
|
|
{% endmacro -%}
|
|
---
|
|
|
|
resource_types:
|
|
- name: github-release
|
|
type: registry-image
|
|
source:
|
|
repository: concourse/github-release-resource
|
|
|
|
- name: gitea-status
|
|
type: registry-image
|
|
source:
|
|
repository: ((registry_url))/gitea-status
|
|
|
|
resources:
|
|
- name: repo
|
|
type: git
|
|
icon: github
|
|
source:
|
|
uri: ((forgejo_url))/((repo_owner))/((repo_name))
|
|
branch: master
|
|
|
|
{% for img in images -%}
|
|
{%- if img.type == "simple" %}
|
|
{{ simple_image_resource(img.name) }}
|
|
{%- elif img.type == "file" %}
|
|
{%- import "jobs/" + img.name + ".yml.j2" as job %}
|
|
{{ job.resources() }}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
jobs:
|
|
{%- for img in images %}
|
|
{%- if img.type == "simple" %}
|
|
{{ simple_image.jobs(img) }}
|
|
{%- elif img.type == "file" %}
|
|
{%- import "jobs/" + img.name + ".yml.j2" as job %}
|
|
{{ job.jobs() }}
|
|
{%- endif %}
|
|
{% endfor %}
|
|
|
|
{# vim: ft=yaml-jinja #}
|