From: "Vasilev, Oleg" <oleg.vasilev@intel.com>
To: "Hiler, Arkadiusz" <arkadiusz.hiler@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH v4 6/6] gitlab-ci: introduce containers with IGT inside
Date: Wed, 28 Aug 2019 10:13:25 +0000 [thread overview]
Message-ID: <7f270e2e5fdd483ebdfc6c6db638917bd31abfd1.camel@intel.com> (raw)
In-Reply-To: <20190828060352.2l2l6lvm5iq2hicr@ahiler-desk1.fi.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 6237 bytes --]
On Wed, 2019-08-28 at 09:03 +0300, Arkadiusz Hiler wrote:
> On Tue, Aug 27, 2019 at 05:02:02PM +0300, Oleg Vasilev wrote:
> > Currently, the containers are used only to build IGT. We also want
> > to
> > have an option to run IGT inside a container. For this, new build
> > stage
> > is added.
> >
> > Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com>
> > ---
> > .gitlab-ci.yml | 25 +++++++++++++++++++++++-
> > .gitlab-ci/docker-help.sh | 41
> > +++++++++++++++++++++++++++++++++++++++
> > Dockerfile | 14 +++++++++++++
> > 3 files changed, 79 insertions(+), 1 deletion(-)
> > create mode 100755 .gitlab-ci/docker-help.sh
> > create mode 100644 Dockerfile
> >
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index 0ac12318..76862514 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -16,6 +16,7 @@ stages:
> > - build
> > - test
> > - deploy
> > + - containers
>
> I am not sure it is the right call to make that a stage after deploy.
>
> deploy:pages is buggy and fails often:
> https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/46
>
> For pre-merge it should be ok, if it proves to be troublesome we can
> shuffle it around then.
Can I just swap deploy and containers?
>
> > ################# BUILD CONTAINERS #######################
> >
> > @@ -85,12 +86,15 @@ build-containers:build-fedora:
> > build:tests-fedora:
> > stage: build
> > script:
> > - - meson $MESON_OPTIONS build
> > + - meson --prefix=`pwd`/opt-igt $MESON_OPTIONS build
> > - ninja -C build
> > + - ninja -C build install
> > - ninja -C build igt-gpu-tools-doc
> > + - ls opt-igt
>
> Leftover ls?
>
> > artifacts:
> > paths:
> > - build
> > + - opt-igt
> >
> > build:tests-fedora-no-libunwind:
> > stage: build
> > @@ -273,3 +277,22 @@ pages:
> > only:
> > - master
> >
> > +############## CONTAINERS ####################
> > +
> > +
> > +containers:igt:
> > + stage: containers
> > + image: docker:stable
> > + services:
> > + - docker:dind
> > + dependencies:
> > + - build:tests-fedora
> > + variables:
> > + DOCKER_HOST: tcp://docker:2375
> > + DOCKER_DRIVER: overlay2
> > + FORCE_REBUILD: 1
> > + script:
> > + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN
> > $CI_REGISTRY
> > + - docker pull $CI_REGISTRY/$CI_PROJECT_PATH/build-
> > fedora:$CI_COMMIT_REF_NAME
> > + - docker tag $CI_REGISTRY/$CI_PROJECT_PATH/build-
> > fedora:$CI_COMMIT_REF_NAME build-fedora
>
> You forgot to change those to use commit-$CI_COMMIT_SHA:
> https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/540405
Right, I'll retest the series over a clear registry to make sure
everything builds correctly.
>
> > + - .gitlab-ci/pull-or-rebuild.sh Dockerfile igt
> > diff --git a/.gitlab-ci/docker-help.sh b/.gitlab-ci/docker-help.sh
> > new file mode 100755
> > index 00000000..6e3f8021
> > --- /dev/null
> > +++ b/.gitlab-ci/docker-help.sh
> > @@ -0,0 +1,41 @@
> > +#!/bin/sh
> > +#
> > +# Copyright © 2019 Intel Corporation
> > +#
> > +# Permission is hereby granted, free of charge, to any person
> > obtaining a
> > +# copy of this software and associated documentation files (the
> > "Software"),
> > +# to deal in the Software without restriction, including without
> > limitation
> > +# the rights to use, copy, modify, merge, publish, distribute,
> > sublicense,
> > +# and/or sell copies of the Software, and to permit persons to
> > whom the
> > +# Software is furnished to do so, subject to the following
> > conditions:
> > +#
> > +# The above copyright notice and this permission notice (including
> > the next
> > +# paragraph) shall be included in all copies or substantial
> > portions of the
> > +# Software.
> > +#
> > +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > EXPRESS OR
> > +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > MERCHANTABILITY,
> > +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
> > EVENT SHALL
> > +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
> > DAMAGES OR OTHER
> > +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > ARISING
> > +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > OTHER DEALINGS
> > +# IN THE SOFTWARE.
> > +
> > +TEST_LIST=$(find /opt/igt/libexec/igt-gpu-tools -type f -printf
> > "%f ")
> > +cat << END
> > +This is a docker container, packaged with the igt-gpu-tools.
> > + - igt_runner is in the \$PATH. In order for the results to be
> > available on the
> > + host system, the directory has to be made available inside,
> > e.g.
> > + docker run -v results:/tmp/results igt-final igt_runner
> > /tmp/results
> > + - The test lists are in /opt/igt/share/igt-gpu-tools
> > + - The test binaries are in \$IGT_TEST_ROOT=$IGT_TEST_ROOT
> > +
> > +In order for the graphic devices to be available inside the docker
> > container,
> > +those either need to be mapped with --device or the container
> > needs to be run
> > +in --privileged mode.
> > +
> > +Contents of /opt/igt/libexec/igt-gpu-tools: $TEST_LIST
> > +PATH: $PATH
> > +LD_LIBRARY_PATH: $LD_LIBRARY_PATH
> > +IGT_TEST_ROOT: $IGT_TEST_ROOT
> > +END
> > diff --git a/Dockerfile b/Dockerfile
> > new file mode 100644
> > index 00000000..b601aecd
> > --- /dev/null
> > +++ b/Dockerfile
> > @@ -0,0 +1,14 @@
> > +# Version number to bump for force image rebuild: 0
> > +FROM build-fedora
> > +
> > +RUN dnf install -y findutils && \
> > + dnf clean all
>
> I think we should move those to the base image - `dnf install` seems
> to
> be the most failure-prone part of this whole endeavor. It's the most
> common reason that igt-ci-tags for pre-merge fails (after the other
> issues were addressed).
Well, using build image as a base for igt container should be only
temporarily. Once better base image is ready, it should then be moved there.
>
> With the things above fixed, the whole series is:
> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3261 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-08-28 10:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 14:01 [igt-dev] [PATCH v4 1/6] gitlab-ci: move containers section to the top Oleg Vasilev
2019-08-27 14:01 ` [igt-dev] [PATCH v4 2/6] gitlab-ci: rename igt-* container to build-* Oleg Vasilev
2019-08-27 14:01 ` [igt-dev] [PATCH v4 3/6] gitlab-ci: rename Dockerfiles Oleg Vasilev
2019-08-27 14:02 ` [igt-dev] [PATCH v4 4/6] gitlab-ci: rebuild images only on Dockerfile changes Oleg Vasilev
2019-08-27 14:02 ` [igt-dev] [PATCH v4 5/6] gitlab-ci: use images tagged with git ref instead of latest Oleg Vasilev
2019-08-27 14:02 ` [igt-dev] [PATCH v4 6/6] gitlab-ci: introduce containers with IGT inside Oleg Vasilev
2019-08-28 6:03 ` Arkadiusz Hiler
2019-08-28 10:13 ` Vasilev, Oleg [this message]
2019-08-27 14:29 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [v4,1/6] gitlab-ci: move containers section to the top Patchwork
2019-08-28 12:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f270e2e5fdd483ebdfc6c6db638917bd31abfd1.camel@intel.com \
--to=oleg.vasilev@intel.com \
--cc=arkadiusz.hiler@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox