We've been using a generic `osbuild-run`, which sets up the build environment (and works around bugs) for all build roots. It is already getting unwieldy, because it tries to detect the OS for some things it configures. It's also about to cause problems for RHEL, which doesn't currently support a python3 shebang without having /etc around. This patch changes the `build` key in a pipeline to not be a pipeline itself, but an object with `runner` and `pipeline` keys. `pipeline` is the build pipeline, as before. `runner` is the name of the runner to use. Runners are programs in the `runners` subdirectory. Three runners are included in this patch. They're copies of osbuild-run for now (except some additions for rhel82). The idea is that each of them only contains the minimal setup code necessary for an OS, and that we can review what's needed when updating a build root. Also modify the `--build-pipeline` command line switch to accept such a build object (instead of a pipeline) and rename it accordingly, to `--build-env`. Correspondingly, `OSBUILD_TEST_BUILD_PIPELINE` → `OSBUILD_TEST_BUILD_ENV`.
34 lines
1.9 KiB
YAML
34 lines
1.9 KiB
YAML
dist: bionic
|
|
language: python
|
|
python:
|
|
- "3.7"
|
|
env:
|
|
- PYTHONUNBUFFERED=1
|
|
jobs:
|
|
include:
|
|
- name: pylint
|
|
install: pip install pylint==2.4.1
|
|
script: pylint osbuild runners/* assemblers/* stages/*
|
|
- name: unit-tests
|
|
script: python3 -m unittest test.test_osbuild
|
|
- name: rpm
|
|
before_install:
|
|
- sudo apt-get install -y rpm python3-setuptools
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python-srpm
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python3
|
|
script: make rpm-nodeps
|
|
- name: pipeline-noop
|
|
before_install: sudo apt-get install -y systemd-container
|
|
script:
|
|
- sudo env "PATH=$PATH" python3 -m osbuild --libdir . --build-env samples/ubuntu1804.json samples/noop.json
|
|
- sudo env "PATH=$PATH" python3 -m osbuild --libdir . --build-env samples/ubuntu1804.json samples/noop.json
|
|
- name: f30-boot
|
|
before_install: sudo apt-get install -y systemd-container yum qemu-kvm
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_boot
|
|
- name: assemblers
|
|
before_install: sudo apt-get install -y systemd-container yum tar qemu-utils
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_assemblers
|
|
- name: stage-tests
|
|
before_install: sudo apt-get install -y systemd-container yum
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_stages
|