Commit 67a3045b authored by Peter Hutterer's avatar Peter Hutterer
Browse files

bootstrap: set the bootstrap distro/version through a variable

We don't expect this to change anytime soon but seems like the right thing to
do.

Changes in v2:
make the bootstrap script distro-specific

If the bootstrap distro itself is configurable, the bootstrap script
should be tied to that distribution. A fedora script to dnf install packages
won't work if we use debian for example. As suggested in
!83 (comment 804921)

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent e9fb6548
......@@ -31,10 +31,10 @@ stages:
extends: .bootstrap_skeleton@x86_64
image: fedora:33
before_script:
- bash bootstrap/bootstrap.sh
- bash bootstrap/bootstrap_fedora.sh
variables:
FDO_REPO_SUFFIX: x86_64/buildah
FDO_DISTRIBUTION_EXEC: 'bash bootstrap/bootstrap.sh'
FDO_DISTRIBUTION_EXEC: 'bash bootstrap/bootstrap_fedora.sh'
.bootstrap@aarch64:
......
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
include:
- local: '/templates/fedora.yml'
- local: '/templates/{{bootstrap_distro}}.yml'
stages:
- bootstrapping
......@@ -15,11 +15,11 @@ stages:
.bootstrap_skeleton@x86_64:
extends: .fdo.container-build@fedora@x86_64
extends: .fdo.container-build@{{bootstrap_distro}}@x86_64
stage: bootstrapping
variables:
FDO_UPSTREAM_REPO: freedesktop/ci-templates
FDO_DISTRIBUTION_VERSION: '33'
FDO_DISTRIBUTION_VERSION: '{{bootstrap_distro_version}}'
FDO_DISTRIBUTION_TAG: '{{bootstrap_tag}}'
......@@ -29,17 +29,17 @@ stages:
# end up building a regular container image from arch.
.bootstrap@x86_64:
extends: .bootstrap_skeleton@x86_64
image: fedora:33
image: {{bootstrap_distro}}:{{bootstrap_distro_version}}
before_script:
- bash bootstrap/bootstrap.sh
- bash bootstrap/bootstrap_{{bootstrap_distro}}.sh
variables:
FDO_REPO_SUFFIX: x86_64/buildah
FDO_DISTRIBUTION_EXEC: 'bash bootstrap/bootstrap.sh'
FDO_DISTRIBUTION_EXEC: 'bash bootstrap/bootstrap_{{bootstrap_distro}}.sh'
.bootstrap@aarch64:
extends: .bootstrap@x86_64
image: arm64v8/fedora:33
image: arm64v8/{{bootstrap_distro}}:{{bootstrap_distro_version}}
tags:
- aarch64
variables:
......
......@@ -8,3 +8,6 @@ qemu_tag: '2021-02-15.0'
## for bootstrap images.
ci_templates_registry: 'quay.io'
ci_templates_registry_path: '/freedesktop.org/ci-templates'
bootstrap_distro: 'fedora'
bootstrap_distro_version: '33'
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