/sysdep/autoconf.h.in~
/cscope.*
*.tar.gz
+/gitlab/docker.mk
rules:
- !reference [ .default-rules ]
+## Build Docker consistency check
+docker-uptodate:
+ stage: consistency
+ image: registry.nic.cz/labs/bird:docbuilder
+ script:
+ - autoreconf -i
+ - ./configure
+ - touch gitlab/data.yml.j2
+ - make gitlab-docker VENV=1
+ - touch gitlab/docker/docbuilder/Dockerfile # Docbuilder is a static image, not rebuilt by the templates
+ - find gitlab/docker/ -type f -not -newer gitlab/data.yml.j2
+ - '[ "`find gitlab/docker/ -type f -not -newer gitlab/data.yml.j2 | wc -l`" == "0" ]'
+ - git status --porcelain
+ - git diff --exit-code
+ rules:
+ - !reference [ .default-rules ]
+
## Consistency checks for stable branches
commit-messages:
stage: consistency
.docker: &docker-build
stage: image
+ needs: [] # docker-uptodate maybe?
script:
- $DOCKER_CMD login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.nic.cz
# Make sure we refresh the base image if it updates (eg. security updates, etc)
.build-birdlab-base: &build-birdlab-base
<<: *build-base
stage: build
+ needs: []
# script:
# - export BRANCH=$CI_COMMIT_BRANCH
# - autoreconf
build-netlab:
<<: *netlab-rules
stage: build
+ needs: []
variables:
BDIR: build-netlab
tags:
--- /dev/null
+{% for distro in distros %}{% if distro.name == target -%}
+{% set d = distro.docker -%}
+{% if d == "static" %}{{ fail("Docker for " ~ target ~ " is static, edit that file directly and don't forget to commit the changes into Git.") }}{% endif -%}
+# Autogenerated Dockerfile for {{ target }}.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
+FROM {{ d.parent }}
+{%- if distro.type == "deb" %}
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt-get -y update
+RUN apt-get -y upgrade
+RUN apt-get -y --no-install-recommends install \
+ {% if distro.shortname == "ubuntu" %}tzdata \
+ {% endif %}build-essential \
+ flex \
+ bison \
+ autoconf \
+ ncurses-dev \
+ libreadline-dev \
+ {{ d.libssh_kind }}-dev \
+ linuxdoc-tools-latex \
+ texlive-latex-extra \
+ opensp \
+ docbook-xsl \
+ xsltproc{% if d.needs_adduser %} \
+ adduser{% endif %}
+RUN apt-get -y --no-install-recommends install \
+ git \
+ dpkg-dev \
+ debhelper \
+ lsb-release \
+ apt-utils \
+ quilt \
+ python3 \
+ python3-pip \
+ python3-setuptools \
+ python3-venv
+{%- elif distro.type == "rpm" %}
+{%- if d.preinstall %}
+{{ d.preinstall }}
+{%- endif %}
+RUN {{ d.installer }} up{% if d.installer[:6] != "zypper" %}grade{% endif %}
+RUN {{ d.installer }} install \
+ gcc \
+ make \
+ flex \
+ bison \
+ autoconf \
+ {%- if d.pkgconfig %}
+ pkgconfig \
+ {%- endif %}
+ libssh-devel \
+ ncurses-devel \
+ readline-devel
+RUN {{ d.installer }} install \
+ git \
+ {%- if d.alternative_lsb %}
+ {{ d.alternative_lsb }} \
+ {%- else %}
+ lsb-release \
+ {%- endif %}
+ rpm-build \
+ {%- if d.faketime == "lib" %}
+ libfaketime \
+ {%- elif d.faketime %}
+ faketime \
+ {%- endif %}
+ {%- if d.systemd %}
+ systemd \
+ {%- endif %}
+ systemd-rpm-macros \
+ {%- if d.sysuser %}
+ sysuser-tools \
+ {%- endif %}
+ python3 \
+ python3-pip \
+ python3-setuptools
+{%- endif %}
+{%- endif %}{% endfor %}
#$(s)%.yml: $(s)pipeline.py $(s)%.yml.j2 $(s)data.yml.j2
.gitlab-ci.yml: $(s)pipeline.py $(s)template.yml.j2 $(s)data.yml.j2
python3 $^ > $@
+ @if grep -n ' ' $@; then echo "Found a tab in yaml output!"; false; fi
#gitlab-local: $(patsubst %,$(s)%.yml,$(GITLAB_SECTIONS))
gitlab-local: .gitlab-ci.yml
+# Conditionally include Dockerfile build but only if required
+ifneq ($(filter gitlab-docker $(s)docker,$(MAKECMDGOALS)),)
+$(s)docker/%/Dockerfile: $(s)pipeline.py $(s)Dockerfile.j2 $(s)data.yml.j2
+ $(if $(VENV),$(MAKE) $(GITLAB_VENV))
+ mkdir -p $(dir $@)
+ $(if $(VENV),$(call VPYTHON,$(GITLAB_VENV)),python3) $^ target=$* > $@
+
+$(s)docker.mk: $(s)pipeline.py $(s)docker.mk.j2 $(s)data.yml.j2
+ $(if $(VENV),$(MAKE) $(GITLAB_VENV))
+ $(if $(VENV),$(call VPYTHON,$(GITLAB_VENV)),python3) $^ > $@
+
+include $(s)docker.mk
+endif
+
VPYTHON = VIRTUAL_ENV=$(1) PATH="$(1)/bin:$$PATH" $(1)/bin/python3
VPIP = VIRTUAL_ENV=$(1) PATH="$(1)/bin:$$PATH" $(1)/bin/pip3
VRUN = VIRTUAL_ENV=$(1) PATH="$(1)/bin:$$PATH" $(2)
LC_ALL: en_US.UTF-8
CC: /opt/rh/devtoolset-8/root/usr/bin/gcc
type: rpm
+ docker: static
- name: centos-8-amd64
type: rpm
+ docker:
+ parent: 'centos:8'
+ installer: yum -y
+ alternative_lsb: redhat-lsb-core
+ systemd: false
+ preinstall: |
+ # Has to be done for yum to work properly. CentOS 8 is EOL.
+ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
+ RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
+ RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo
# Rocky and Oracle Linux, forks of CentOS/RHEL
- {% for num in ('08','09') -%}
+ # check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_2
+ {% for inum,snum in ((8,10),(9,5)) -%}
+ {% if inum >= 10 %}{% set num = inum ~ "" %}{% else %}{% set num = "0" ~ inum %}{% endif -%}
- name: rocky-{{ num }}-amd64
type: rpm
+ docker:
+ parent: 'rockylinux/rockylinux:{{ inum }}.{{snum}}'
+ installer: yum -y
+ {%- if num == "08" %}
+ alternative_lsb: redhat-lsb-core
+ systemd: false
+ {%- else %}
+ systemd: true
+ faketime: true
+ preinstall: 'RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ inum }}.noarch.rpm'
+ {%- endif %}
{% endfor %}
- {% for num in ('08','09','10') -%}
+ {% for inum in (8,9,10) -%}
+ {% if inum >= 10 %}{% set num = inum ~ "" %}{% else %}{% set num = "0" ~ inum %}{% endif -%}
- name: oracle-{{ num }}-amd64
type: rpm
+ docker:
+ parent: 'oraclelinux:{{ inum }}'
+ installer: yum -y
+ {%- if num == "08" %}
+ alternative_lsb: redhat-lsb-core
+ systemd: false
+ {%- else %}
+ systemd: true
+ faketime: true
+ preinstall: 'RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ inum }}.noarch.rpm'
+ {%- endif %}
{% endfor %}
# Last 7 years of OpenSUSE
{% for num in (0,1,2,3,4,5) -%}
- name: opensuse-15.{{ num }}-amd64
type: rpm
+ docker:
+ parent: 'opensuse/leap:15.{{num}}'
+ installer: zypper -n
+ pkgconfig: true
+ systemd: true
+ faketime: lib
+ sysuser: true
{% endfor %}
- - name: opensuse-16.0-amd64
+ {% for num in (0,) -%}
+ - name: opensuse-16.{{ num }}-amd64
type: rpm
+ docker:
+ parent: 'opensuse/leap:16.{{num}}'
+ installer: zypper -n
+ pkgconfig: true
+ systemd: true
+ faketime: lib
+ sysuser: true
+ {% endfor %}
# Last 12 versions of Fedora
{% for num in (32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43) -%}
- name: fedora-{{ num }}-amd64
type: rpm
+ docker:
+ parent: fedora:{{ num }}
+ installer: dnf -y
+ pkgconfig: true
+ faketime: true
+ {%- if num <= 36 %}
+ alternative_lsb: redhat-lsb-core
+ {%- endif %}
+ {%- if num > 32 %}
+ systemd: true
+ {%- endif %}
+
{% endfor %}
# Debian from oldoldstable up to testing
- {% for num in (11, 12, 13, 'testing') -%}
+ {% for num, codename in (
+ (11, "bullseye"),
+ (12, "bookworm"),
+ (13, "trixie"),
+ ("testing", "testing")
+ ) -%}
{% for arch in ('amd64', 'i386') -%}
- name: debian-{{num}}-{{arch}}
type: deb
+ shortname: debian
+ docker:
+ parent: {{ arch }}/debian:{{ codename }}-slim
+ libssh_kind: {% if (num != "testing") and (num < 13) %}libssh-gcrypt{% else %}libssh{% endif %}
+ needs_adduser: {% if (num != "testing") and (num < 13) %}false{% else %}true{% endif %}
{% endfor %}
{% endfor %}
{% for num in ('18.04', '20.04', '22.04', '24.04', '25.04', '25.10') -%}
- name: ubuntu-{{ num }}-amd64
type: deb
+ shortname: ubuntu
+ docker:
+ parent: "ubuntu:{{ num }}"
+ libssh_kind: {% if (num[:2] | int) < 25 %}libssh-gcrypt{% else %}libssh{% endif %}
+ needs_adduser: {% if (num[:2] | int) > 22 %}true{% else %}false{% endif %}
{% endfor %}
birdlab:
--- /dev/null
+GITLAB_DOCKER_IMAGES := \
+{% for distro in distros -%}
+ $(s)docker/{{ distro.name }}/Dockerfile \
+{% endfor %}
+
+gitlab-docker: $(GITLAB_DOCKER_IMAGES)
+
+{% for distro in distros -%}
+{% if distro.docker == "static" %}
+$(s)docker/{{ distro.name }}/Dockerfile: $(s)docker.mk.j2 $(s)data.yml.j2
+ @echo "KEEP $@ (marked as static)"
+ touch $@
+
+{% endif %}
+{% endfor %}
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for centos-8-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM centos:8
-
# Has to be done for yum to work properly. CentOS 8 is EOL.
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
readline-devel
RUN yum -y install \
git \
- rpm-build \
redhat-lsb-core \
+ rpm-build \
systemd-rpm-macros \
python3 \
python3-pip \
+++ /dev/null
-# bump number for image rebuild: 0
-FROM debian:buster-slim
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get -y update
-RUN apt-get -y upgrade
-RUN apt-get -y --no-install-recommends install \
- build-essential \
- flex \
- bison \
- autoconf \
- ncurses-dev \
- libreadline-dev \
- libssh-gcrypt-dev \
- linuxdoc-tools-latex \
- texlive-latex-extra \
- opensp \
- docbook-xsl \
- xsltproc
-RUN apt-get -y --no-install-recommends install \
- git \
- dpkg-dev \
- debhelper \
- lsb-release \
- quilt \
- python3 \
- python3-pip \
- python3-setuptools \
- python3-venv
+++ /dev/null
-# bump number for image rebuild: 0
-FROM i386/debian:buster-slim
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get -y update
-RUN apt-get -y upgrade
-RUN apt-get -y --no-install-recommends install \
- build-essential \
- flex \
- bison \
- autoconf \
- ncurses-dev \
- libreadline-dev \
- libssh-gcrypt-dev \
- linuxdoc-tools-latex \
- texlive-latex-extra \
- opensp \
- docbook-xsl \
- xsltproc
-RUN apt-get -y --no-install-recommends install \
- git \
- dpkg-dev \
- debhelper \
- lsb-release \
- apt-utils \
- quilt \
- python3 \
- python3-pip \
- python3-setuptools \
- python3-venv
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for debian-11-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM amd64/debian:bullseye-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 1
+# Autogenerated Dockerfile for debian-11-i386.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM i386/debian:bullseye-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 2
+# Autogenerated Dockerfile for debian-12-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM amd64/debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 1
+# Autogenerated Dockerfile for debian-12-i386.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM i386/debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 3
+# Autogenerated Dockerfile for debian-13-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM amd64/debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 2
+# Autogenerated Dockerfile for debian-13-i386.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM i386/debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump number for image rebuild: 0
-FROM debian:testing-slim
-ENV DEBIAN_FRONTEND noninteractive
+# Autogenerated Dockerfile for debian-testing-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
+FROM amd64/debian:testing-slim
+ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y --no-install-recommends install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for debian-testing-i386.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM i386/debian:testing-slim
-ENV DEBIAN_FRONTEND noninteractive
+ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y --no-install-recommends install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-32-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:32
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-33-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:33
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-34-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:34
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-35-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:35
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-36-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:36
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-37-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:37
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-38-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:38
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-39-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:39
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-40-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:40
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-41-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:41
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for fedora-42-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:42
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 1
+# Autogenerated Dockerfile for fedora-43-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM fedora:43
RUN dnf -y upgrade
RUN dnf -y install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-15.0-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.0
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-15.1-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.1
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-15.2-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.2
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-15.3-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.3
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 1
+# Autogenerated Dockerfile for opensuse-15.4-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.4
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-15.5-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:15.5
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for opensuse-16.0-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM opensuse/leap:16.0
RUN zypper -n up
RUN zypper -n install \
libfaketime \
systemd \
systemd-rpm-macros \
+ sysuser-tools \
python3 \
python3-pip \
- python3-setuptools \
- sysuser-tools
+ python3-setuptools
-# bump number for image rebuild: 1
-# check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_1
+# Autogenerated Dockerfile for oracle-08-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM oraclelinux:8
-
RUN yum -y upgrade
RUN yum -y install \
gcc \
-# bump number for image rebuild: 1
-# check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_2
+# Autogenerated Dockerfile for oracle-09-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM oraclelinux:9
-
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
-
RUN yum -y upgrade
RUN yum -y install \
gcc \
-# bump number for image rebuild: 1
-# check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_2
+# Autogenerated Dockerfile for oracle-10-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM oraclelinux:10
-
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
-
RUN yum -y upgrade
RUN yum -y install \
gcc \
-# bump number for image rebuild: 1
-# check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_1
+# Autogenerated Dockerfile for rocky-08-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM rockylinux/rockylinux:8.10
-
RUN yum -y upgrade
RUN yum -y install \
gcc \
-# bump number for image rebuild: 1
-# check latest supported version at https://wiki.rockylinux.org/rocky/version/#__tabbed_1_2
+# Autogenerated Dockerfile for rocky-09-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM rockylinux/rockylinux:9.5
-
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
-
RUN yum -y upgrade
RUN yum -y install \
gcc \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for ubuntu-18.04-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:18.04
-ENV DEBIAN_FRONTEND noninteractive
+ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y --no-install-recommends install \
-# bump number for image rebuild: 0
+# Autogenerated Dockerfile for ubuntu-20.04-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump this to refresh the image: 1
+# Autogenerated Dockerfile for ubuntu-22.04-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump this to refresh the image: 1
+# Autogenerated Dockerfile for ubuntu-24.04-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump this to refresh the image: 1
+# Autogenerated Dockerfile for ubuntu-25.04-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:25.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
-# bump this to refresh the image: 1
+# Autogenerated Dockerfile for ubuntu-25.10-amd64.
+# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
+# to change this file.
+# Request a manual pipeline to rebuild the image here:
+# https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:25.10
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
import yaml
# Find where we are
-_, template_file, data_file, *_ = sys.argv
+_, template_file, data_file, *more = sys.argv
+hm = { k: v for k,v in [ x.split("=", 1) for x in more ] }
+
+# Crash helper
+def fail(msg):
+ raise Exception(msg)
# Prepare Jinja2 environment
env = jinja2.Environment(loader=jinja2.FileSystemLoader("."))
+env.globals['fail'] = fail
env.filters.update({ "to_yaml": lambda x: "" if type(x) is jinja2.runtime.Undefined else yaml.dump(x).rstrip() })
# Load and process input data
template = env.get_template(template_file)
# Render the template
-final = template.render({ **data })
-
-# YAML is picky about tabs, forbid them
-assert('\t' not in final)
+final = template.render({ **data, **hm })
# Produce output
print(final)
rules:
- !reference [ .default-rules ]
+## Build Docker consistency check
+docker-uptodate:
+ stage: consistency
+ image: registry.nic.cz/labs/bird:docbuilder
+ script:
+ - autoreconf -i
+ - ./configure
+ - touch gitlab/data.yml.j2
+ - make gitlab-docker VENV=1
+ - touch gitlab/docker/docbuilder/Dockerfile # Docbuilder is a static image, not rebuilt by the templates
+ - find gitlab/docker/ -type f -not -newer gitlab/data.yml.j2
+ - '[ "`find gitlab/docker/ -type f -not -newer gitlab/data.yml.j2 | wc -l`" == "0" ]'
+ - git status --porcelain
+ - git diff --exit-code
+ rules:
+ - !reference [ .default-rules ]
+
## Consistency checks for stable branches
commit-messages:
stage: consistency
.docker: &docker-build
stage: image
+ needs: [] # docker-uptodate maybe?
script:
- $DOCKER_CMD login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.nic.cz
# Make sure we refresh the base image if it updates (eg. security updates, etc)
.build-birdlab-base: &build-birdlab-base
<<: *build-base
stage: build
+ needs: []
# script:
# - export BRANCH=$CI_COMMIT_BRANCH
# - autoreconf
build-netlab:
<<: *netlab-rules
stage: build
+ needs: []
variables:
BDIR: build-netlab
tags: