debian-forge/.travis.yml
Lars Karlitski 510e2b1e94 osbuild: introduce sources
Pipelines encode which source content they need in the form of
repository metadata checksums (or rpm checksums). In addition, they
encode where they fetch that source content from in the form of URLs.
This is overly specific and doesn't have to be in the pipeline's hash:
the checksum is enough to specify an image.

In practice, this precluded using alternative ways of getting at source
packages, such as local mirrors, which could speed up development.

Introduce a new osbuild API: sources. With it, a stage can query for a
way to fetch source content based on checksums.

The first such source is `org.osbuild.dnf`, which returns repository
configuration for a metadata checksum. Note that the dnf stage continues
to verify that the content it received matches the checksum it expects.

Sources are implemented as programs, living in a `sources` directory.
They are run on the host (i.e., uncontained) right now. Each source gets
passed options, which are taken from a new command line argument to
osbuild, and an array of checksums for which to return content.

This API is only available to stages right now.
2019-12-23 01:12:38 +01:00

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/* sources/*
- 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 nbd-client
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