Commit 97430b86 authored by Chandan Singh's avatar Chandan Singh

Merge branch 'chandan/bst-image' into 'master'

Add new buildstream image

See merge request !107
parents b378eb71 0cb8cf9f
Pipeline #47453105 canceled with stages
in 200 minutes and 37 seconds
This diff is collapsed.
......@@ -26,6 +26,7 @@ YAMLLINT = yamllint --strict
WHITESPACE_CHECK = grep -En ' +$$'
BST_DOCKER_RUN = docker run --rm --privileged --device /dev/fuse
BST_TEST = git clone https://gitlab.com/BuildStream/buildstream.git && cd buildstream && tox -- --color=yes --integration
BST_SMOKE_TEST = bst --version
# Targets
TARGETS_DOCKER = build push release
......@@ -85,6 +86,9 @@ render:
bst-test:
$(BST_DOCKER_RUN) $(FIXED_TAG) /bin/sh -c "$(BST_TEST)"
bst-smoke-test:
$(BST_DOCKER_RUN) $(FIXED_TAG) /bin/sh -c "$(BST_SMOKE_TEST)"
# CI targets
ci-image-compare: ci-image-pull
......
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
# external-plugins dependencies
quilt \
&& \
# install python dependencies
pip3 install \
arpy \
git+https://gitlab.com/buildstream/bst-external.git@0.9.0 \
git+https://gitlab.com/BuildStream/buildstream.git@1.3.0 \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# install-time dependencies
git \
&& \
# install python dependencies
pip3 install \
git+https://gitlab.com/BuildStream/buildstream.git@1.3.0 \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ git python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
&& \
# install python dependencies
pip3 install \
arpy \
git+https://gitlab.com/BuildStream/buildstream.git@1.3.0 \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
# external-plugins dependencies
quilt \
&& \
# install python dependencies
pip3 install \
arpy \
BuildStream \
git+https://gitlab.com/buildstream/bst-external.git@0.9.0 \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
&& \
# install python dependencies
pip3 install \
BuildStream \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
&& \
# install python dependencies
pip3 install \
arpy \
BuildStream \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
# external-plugins dependencies
quilt \
&& \
# install python dependencies
pip3 install \
arpy \
git+https://gitlab.com/buildstream/bst-external.git@0.9.0 \
git+https://gitlab.com/BuildStream/buildstream.git \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# install-time dependencies
git \
&& \
# install python dependencies
pip3 install \
git+https://gitlab.com/BuildStream/buildstream.git \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ git python3-devel && \
dnf clean all
##########################################################
## WARNING: AUTOGENERATED FILE
##
## This file has been generated by `templates/render.py`.
## Any changes made to it will be erased when the script
## is rerun.
##
## If you want to update this file, please edit the
## corresponding file in `templates` and rerun
## `templates/render.py`
##########################################################
FROM fedora:29
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# install all system dependencies
RUN \
# Install dependencies
dnf install --assumeyes \
# buildstream dependencies
bubblewrap \
fuse \
fuse-devel \
# python-build dependencies
gcc \
gcc-c++ \
python3-devel \
python3-pip \
python3-setuptools \
# utilities dependencies
bash-completion \
# plugin dependencies
bzr \
git \
lzip \
ostree \
patch \
python3-gobject \
&& \
# install python dependencies
pip3 install \
arpy \
git+https://gitlab.com/BuildStream/buildstream.git \
&& \
# Cleanup afterwards
dnf remove --assumeyes gcc gcc-c++ python3-devel && \
dnf clean all
{% include "autogen-warning.j2" %}
FROM {{ image_name }}
FROM {{ base_image }}
ENV LANG {{ locale }}
ENV LC_ALL {{ locale }}
......@@ -25,7 +25,9 @@ RUN \
{% endfor %}
&& \
# install python dependencies
{{ commands.pip }} install tox tox-venv wheel && \
{{ commands.pip }} install \
{{ python_dependencies | sort | join(" \\\n ") }} \
&& \
{% for command in commands.cleanup %}
{% if loop.first %}
# Cleanup afterwards
......
---
###############
## Templates ##
###############
# Defaults
#
# This is the defaults that are common between each variant
.default: &defaults
base: fedora:29
locale: en_US.UTF-8
commands: &commands
preinstall: []
package_install: dnf install --assumeyes
pip: pip3
cleanup:
- dnf remove --assumeyes gcc gcc-c++ python3-devel
- dnf clean all
dependencies: &dependencies
buildstream:
- bubblewrap
- fuse
- fuse-devel
python-build:
- gcc
- gcc-c++
- python3-devel
- python3-pip
- python3-setuptools
utilities:
- bash-completion
.regular-template: &regular
<<: *defaults
dependencies: &regular-dependencies
<<: *dependencies
plugin:
- bzr
- git
- lzip
- patch
- ostree
- python3-gobject
.slim-template: &slim
<<: *defaults
.extra-template: &extra
<<: *defaults
dependencies:
<<: *regular-dependencies
external-plugins:
- quilt
############
## Images ##
############
latest:
<<: *regular
python_dependencies:
- arpy
- BuildStream
dev:
<<: *regular
python_dependencies:
- arpy
- git+https://gitlab.com/BuildStream/buildstream.git@1.3.0
nightly:
<<: *regular
python_dependencies:
- arpy
- git+https://gitlab.com/BuildStream/buildstream.git
latest-slim:
<<: *slim
python_dependencies:
- BuildStream
dev-slim:
<<: *slim
commands:
<<: *commands
cleanup:
- dnf remove --assumeyes gcc gcc-c++ git python3-devel
- dnf clean all
dependencies:
<<: *dependencies
install-time:
- git
python_dependencies:
- git+https://gitlab.com/BuildStream/buildstream.git@1.3.0
nightly-slim:
<<: *slim
commands:
<<: *commands
cleanup:
- dnf remove --assumeyes gcc gcc-c++ git python3-devel
- dnf clean all
dependencies:
<<: *dependencies
install-time:
- git
python_dependencies:
- git+https://gitlab.com/BuildStream/buildstream.git
latest-extra:
<<: *extra
python_dependencies:
- arpy
- BuildStream
- git+https://gitlab.com/buildstream/bst-external.git@0.9.0
dev-extra:
<<: *extra
python_dependencies:
- arpy
- git+https://gitlab.com/BuildStream/buildstream.git@1.3.0
- git+https://gitlab.com/buildstream/bst-external.git@0.9.0
nightly-extra:
<<: *extra
python_dependencies:
- arpy
- git+https://gitlab.com/BuildStream/buildstream.git
- git+https://gitlab.com/buildstream/bst-external.git@0.9.0
......@@ -129,6 +129,78 @@ static-checks:
{% endfor %}
{% endfor %}
#############################
## BUILDSTREAM IMAGES ##
#############################
{% for image in BUILDSTREAM_IMAGES %}
{% for architecture in ARCHITECTURES -%}
{% set image_name_template = "{{}}/buildstream:{}{}{{}}".format(
"" if architecture == DEFAULT_ARCHITECTURE else architecture + "-",
image
) %}
{% set fixed_tag = image_name_template.format("$CI_REGISTRY_IMAGE", "-$FIXED_TAG_SUFFIX") %}
{% set docker_hub_fixed_tag = image_name_template.format("buildstream", "-$FIXED_TAG_SUFFIX") %}
{% set moving_tag = image_name_template.format("buildstream", "") %}
buildstream/{{ image }}-{{ architecture }}-build:
<<: *build-and-push
{% if architecture != DEFAULT_ARCHITECTURE %}
tags:
- {{ architecture }}
{% endif %}
{% if architecture in FLAKY_TEST_RUNNERS_ARCHITECTURES %}
retry: 2
{% endif %}
variables:
CONTEXT: buildstream
DOCKERFILE: buildstream/{{ image }}.Dockerfile
FIXED_TAG: {{ fixed_tag }}
MOVING_TAG: {{ moving_tag }}
buildstream/{{ image }}-{{ architecture }}-test:
<<: *test
{% if architecture != DEFAULT_ARCHITECTURE %}
tags:
- {{ architecture }}
{% endif %}
{% if architecture in FLAKY_TEST_RUNNERS_ARCHITECTURES %}
retry: 2
{% endif %}
variables:
FIXED_TAG: {{ fixed_tag }}
TEST_TARGET: bst-smoke-test
buildstream/{{ image }}-{{ architecture }}-release:
<<: *release
{% if architecture != DEFAULT_ARCHITECTURE %}
tags:
- {{ architecture }}
{% endif %}
{% if architecture in FLAKY_TEST_RUNNERS_ARCHITECTURES %}
retry: 2
{% endif %}
before_script:
# System images are released on Docker Hub
- docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
- apk add --no-cache bash make
script:
# Push both FIXED_TAG and MOVING_TAG to Docker Hub
- MOVING_TAG={{ docker_hub_fixed_tag }} ${MAKE} release
- MOVING_TAG={{ moving_tag }} ${MAKE} release
variables:
FIXED_TAG: {{ fixed_tag }}
MOVING_TAG: {{ moving_tag }}
{% endfor %}
{% endfor %}
########################
## TESTSUITE IMAGES ##
########################
......
......@@ -42,11 +42,12 @@ def generate_dockerfiles(env, directory, images):
if image_name.startswith("."):
continue
base_image = variables.get("base", image_name)
filename = "{}/{}.Dockerfile".format(directory, image_name).replace(
":", "-"
)
with REPO_ROOT.joinpath(filename).open("w") as fp:
fp.write(template.render(image_name=image_name, **variables))
fp.write(template.render(base_image=base_image, **variables))
def main():
......@@ -64,6 +65,9 @@ def main():
generate_dockerfiles(
env, "testsuite", load_variables("testsuite_images.yml")
)
generate_dockerfiles(
env, "buildstream", load_variables("buildstream_images.yml")
)
if __name__ == "__main__":
......
......@@ -34,6 +34,11 @@
- findutils
- make
python_dependencies:
- tox
- tox-venv
- wheel
# RHEL templates
#
......