1
Fork 0
ci-images/pipelines/jobs/simple-image.yml.j2
Lucas Schwiderski 39eb09456b
Speed up image uploads
As long as the image isn't used later on, there is no point in the
automatic `get` after `put`.

Also limit the inputs that each `put` step uses.

Closes: #29
2024-08-26 16:17:48 +02:00

23 lines
618 B
Django/Jinja

{% macro jobs(job) -%}
- name: {{ job.name }}
plan:
- get: repo
trigger: true
- task: build-image
privileged: true
file: repo/tasks/build-image.yml
vars:
context: repo/images/{{ job.name }}
dockerfile: ''
target: ''
{%- if "args" in job %}
params:
{%- for name, value in job.args.items() %}
BUILD_ARG_{{name}}: "{{value}}"
{%- endfor %}
{%- endif %}
- put: image-{{ job.name }}
inputs: detect
params: { image: image/image.tar }
no_get: true
{%- endmacro -%}