Commit 3a06265c authored by Benjamin Tissoires's avatar Benjamin Tissoires
Browse files

keep templating whitespace consistent



`sed -i -e 's|{{ |{{|' -e 's| }}|}}|' src/*`

As per !21 request
Signed-off-by: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
parent e8c9f75e
......@@ -106,9 +106,9 @@ defaults:
## be used if "version" is not defined in the YAML file.
##
{% if versions %}
version_examples: [{% for v in versions %} {{ '\'%s\','|format(v)}} {% endfor %}]
version_examples: [{% for v in versions %} {{'\'%s\','|format(v)}} {% endfor %}]
{% else %}
version_examples: [{{ version }}]
version_examples: [{{version}}]
{% endif %}
## @qemu: controls whether we should create the qemu templates or not
......
......@@ -7,20 +7,20 @@ include:
- local: '/bootstrap/bootstrap.yml'
{% for distribution in distribs %}
# {{ distribution.title() }} container builder template
# {{distribution.title()}} container builder template
# projects using this should reference this with the following:
#
# - project: 'freedesktop/ci-templates'
# ref: master # or git sha, see https://docs.gitlab.com/ee/ci/yaml/#includefile
# file: '/templates/{{ distribution }}.yml'
# file: '/templates/{{distribution}}.yml'
#
- local: '/templates/{{ distribution }}.yml'
- local: '/.gitlab-ci/{{ distribution }}-ci.yml'
- local: '/templates/{{distribution}}.yml'
- local: '/.gitlab-ci/{{distribution}}-ci.yml'
{% endfor %}
variables:
BOOTSTRAP_TAG: '{{ bootstrap_tag }}'
QEMU_TAG: '{{ qemu_tag }}'
BOOTSTRAP_TAG: '{{bootstrap_tag}}'
QEMU_TAG: '{{qemu_tag}}'
stages:
......@@ -28,8 +28,8 @@ stages:
- bootstrapping
- bootstrapping_qemu
{% for distribution in distribs %}
- {{ distribution }}_container_build
- {{ distribution }}_check
- {{distribution}}_container_build
- {{distribution}}_check
{% endfor %}
- pages
......
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
#
# {{ warning }}
# {{warning}}
################################################################################
#
......@@ -14,9 +14,9 @@
.ci-commons-{{distribution}}:
variables:
FDO_DISTRIBUTION_PACKAGES: 'wget curl'
FDO_DISTRIBUTION_EXEC: '{{ script }}'
FDO_DISTRIBUTION_EXEC: '{{script}}'
{% if not version %}
FDO_DISTRIBUTION_VERSION: '{{ versions[0] }}'
FDO_DISTRIBUTION_VERSION: '{{versions[0]}}'
{% endif %}
FDO_DISTRIBUTION_TAG: fdo-ci-$CI_PIPELINE_ID
FDO_EXPIRES_AFTER: '1h'
......@@ -131,21 +131,21 @@
#
# straight {{distribution}} build and test
#
{{distribution}}:{{ versions[0] }}@container-build:
{{distribution}}:{{versions[0]}}@container-build:
extends: .{{distribution}}:ci@container-build
{{distribution}}:{{ versions[0] }}@check:
{{distribution}}:{{versions[0]}}@check:
extends: .{{distribution}}@check
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- {{distribution}}:{{versions[0]}}@container-build
- sanity check
# Test FDO_BASE_IMAGE. We don't need to do much here, if our
# FDO_DISTRIBUTION_EXEC script can run curl+wget this means we're running on
# the desired base image. That's good enough.
{{distribution}}:{{ versions[0] }}@base-image:
extends: {{distribution}}:{{ versions[0]}}@container-build
{{distribution}}:{{versions[0]}}@base-image:
extends: {{distribution}}:{{versions[0]}}@container-build
stage: {{distribution}}_check
variables:
# We need to duplicate FDO_DISTRIBUTION_TAG here, gitlab doesn't allow nested expansion
......@@ -155,7 +155,7 @@
FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: fdo-ci-baseimage-$CI_PIPELINE_ID
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- {{distribution}}:{{versions[0]}}@container-build
- sanity check
#
......@@ -214,26 +214,26 @@
{% if aarch64 %}
{{distribution}}:{{ versions[0] }}@container-build@arm64v8:
{{distribution}}:{{versions[0]}}@container-build@arm64v8:
extends: .{{distribution}}:ci@container-build@arm64v8
variables:
FDO_DISTRIBUTION_TAG: fdo-ci-arm64v8-$CI_PIPELINE_ID
{{distribution}}:{{ versions[0] }}@check@arm64v8:
{{distribution}}:{{versions[0]}}@check@arm64v8:
extends: .{{distribution}}@check
tags:
- aarch64
variables:
FDO_DISTRIBUTION_TAG: fdo-ci-arm64v8-$CI_PIPELINE_ID
needs:
- {{distribution}}:{{ versions[0] }}@container-build@arm64v8
- {{distribution}}:{{versions[0]}}@container-build@arm64v8
- sanity check
{% endif %}
{% if qemu %}
{{distribution}}:{{ versions[0] }}@qemu-build:
{{distribution}}:{{versions[0]}}@qemu-build:
extends: .{{distribution}}:ci@qemu-build
variables:
FDO_DISTRIBUTION_TAG: fdo-ci-qemu-$CI_PIPELINE_ID
......@@ -241,13 +241,13 @@
QEMU_BASE_IMAGE: $CI_REGISTRY_IMAGE/qemu-base:$QEMU_TAG
{{distribution}}:{{ versions[0] }}@qemu-check:
{{distribution}}:{{versions[0]}}@qemu-check:
extends: .{{distribution}}@qemu-check
variables:
FDO_DISTRIBUTION_TAG: fdo-ci-qemu-$CI_PIPELINE_ID
needs:
- bootstrap-qemu-mkosi
- {{distribution}}:{{ versions[0] }}@qemu-build
- {{distribution}}:{{versions[0]}}@qemu-build
- sanity check
{% endif %}
......@@ -255,23 +255,23 @@
#
# make sure we do not rebuild the image if the tag exists (during the check)
#
do not rebuild {{distribution}}:{{ versions[0] }}@container-build:
do not rebuild {{distribution}}:{{versions[0]}}@container-build:
extends: .{{distribution}}:ci@container-build
stage: {{distribution}}_check
variables:
FDO_UPSTREAM_REPO: $CI_PROJECT_PATH
FDO_DISTRIBUTION_PACKAGES: 'this-package-should-not-exist'
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- {{distribution}}:{{versions[0]}}@container-build
- sanity check
#
# check if the labels were correctly applied
#
check labels {{distribution}}:{{ versions[0] }}:
check labels {{distribution}}:{{versions[0]}}:
extends:
- {{distribution}}:{{ versions[0] }}@check
- {{distribution}}:{{versions[0]}}@check
image: $CI_REGISTRY_IMAGE/buildah:$BOOTSTRAP_TAG
script:
# FDO_DISTRIBUTION_IMAGE still has indirections
......@@ -299,7 +299,7 @@ check labels {{distribution}}:{{ versions[0] }}:
- '[[ x"$IMAGE_PROJECT" == x"$CI_PROJECT_PATH" ]]'
- '[[ x"$IMAGE_COMMIT" == x"$CI_COMMIT_SHA" ]]'
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- {{distribution}}:{{versions[0]}}@container-build
- sanity check
......@@ -308,7 +308,7 @@ check labels {{distribution}}:{{ versions[0] }}:
# repository (during the check)
# special case where FDO_REPO_SUFFIX == ci_templates_test_upstream
#
pull upstream {{distribution}}:{{ versions[0] }}@container-build:
pull upstream {{distribution}}:{{versions[0]}}@container-build:
extends: .{{distribution}}:ci@container-build
stage: {{distribution}}_check
variables:
......@@ -316,7 +316,7 @@ pull upstream {{distribution}}:{{ versions[0] }}@container-build:
FDO_REPO_SUFFIX: {{distribution}}/ci_templates_test_upstream
FDO_DISTRIBUTION_PACKAGES: 'this-package-should-not-exist'
needs:
- {{distribution}}:{{ versions[0] }}@container-build
- {{distribution}}:{{versions[0]}}@container-build
- sanity check
{% if versions[1:] %}
......
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
#
# {{ warning }}
# {{warning}}
# we cannot reuse exported variables in after_script,
......@@ -203,7 +203,7 @@
#
.fdo.container-build@{{distribution}}:
extends: .fdo.{{distribution}}
image: $CI_REGISTRY/freedesktop/ci-templates/buildah:{{ bootstrap_tag }}
image: $CI_REGISTRY/freedesktop/ci-templates/buildah:{{bootstrap_tag}}
stage: build
script:
# log in to the registry
......@@ -222,7 +222,7 @@
then
BASE_IMAGE="$FDO_BASE_IMAGE";
else
BASE_IMAGE="{{ image }}";
BASE_IMAGE="{{image}}";
fi
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $BASE_IMAGE
# initial set up: take the base image, update it and install the packages
......@@ -324,7 +324,7 @@
# See ``.fdo.container-build@{{distribution}}`` for details.
.fdo.container-build@{{distribution}}@arm64v8:
extends: .fdo.container-build@{{distribution}}
image: $CI_REGISTRY/freedesktop/ci-templates/arm64v8/buildah:{{ bootstrap_tag }}
image: $CI_REGISTRY/freedesktop/ci-templates/arm64v8/buildah:{{bootstrap_tag}}
tags:
- aarch64
{% endif %}
......@@ -342,7 +342,7 @@
extends: .fdo.container-build@{{distribution}}
tags:
- kvm
image: $CI_REGISTRY/freedesktop/ci-templates/qemu-mkosi-base:{{ qemu_tag }}
image: $CI_REGISTRY/freedesktop/ci-templates/qemu-mkosi-base:{{qemu_tag}}
script:
# log in to the registry
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
......@@ -389,7 +389,7 @@
# The packages to appear in both the build and the final image
Packages=
{% for package in qemu_packages %}
{{ package }}
{{package}}
{% endfor %}
EOF
......@@ -458,7 +458,7 @@
graphroot = "/var/lib/containers/storage"
EOF
- QEMU_BASE_IMAGE=${QEMU_BASE_IMAGE:-$CI_REGISTRY/freedesktop/ci-templates/qemu-base:{{ qemu_tag }}}
- QEMU_BASE_IMAGE=${QEMU_BASE_IMAGE:-$CI_REGISTRY/freedesktop/ci-templates/qemu-base:{{qemu_tag}}}
- echo Building $FDO_REPO_SUFFIX:$DISTRO_TAG from $QEMU_BASE_IMAGE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment