diff mbox series

[v1,4/8] docker: update Travis docker image

Message ID 20180530110655.22022-5-alex.bennee@linaro.org
State Superseded
Headers show
Series Travis stability and a few docker patches | expand

Commit Message

Alex Bennée May 30, 2018, 11:06 a.m. UTC
This is still poorly documented by Travis but according to:

  https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally

their reference images are now hosted on Docker Hub. So we update the
FROM line to refer to the new default image. We also need a few
additional tweaks:

  - re-enable deb-src lines for our build-dep install
  - add explicit PATH definition for tools
  - force the build USER to be Travis
  - add clang to FEATURES for our test-clang machinery

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/dockerfiles/travis.docker | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

-- 
2.17.0

Comments

Philippe Mathieu-Daudé May 31, 2018, 4:19 p.m. UTC | #1
Hi Alex,

On 05/30/2018 08:06 AM, Alex Bennée wrote:
> This is still poorly documented by Travis but according to:

> 

>   https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally

> 

> their reference images are now hosted on Docker Hub. So we update the

> FROM line to refer to the new default image. We also need a few

> additional tweaks:

> 

>   - re-enable deb-src lines for our build-dep install

>   - add explicit PATH definition for tools


I don't understand how this is related to QEMU testing, isn't it rather
some Travis-ci bug? We don't need to use PhantomJS / Neo4j / Maven.

>   - force the build USER to be Travis

>   - add clang to FEATURES for our test-clang machinery

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  tests/docker/dockerfiles/travis.docker | 7 +++++--

>  1 file changed, 5 insertions(+), 2 deletions(-)

> 

> diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker

> index 605b6e429b..6e90f033d5 100644

> --- a/tests/docker/dockerfiles/travis.docker

> +++ b/tests/docker/dockerfiles/travis.docker

> @@ -1,8 +1,11 @@

> -FROM quay.io/travisci/travis-ruby

> +FROM travisci/ci-garnet:packer-1512502276-986baf0

>  ENV DEBIAN_FRONTEND noninteractive

>  ENV LANG en_US.UTF-8

>  ENV LC_ALL en_US.UTF-8

> +RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list

>  RUN apt-get update

>  RUN apt-get -y build-dep qemu

>  RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools

> -ENV FEATURES pyyaml

> +ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

> +ENV FEATURES clang pyyaml

> +USER travis

>
Alex Bennée May 31, 2018, 8:14 p.m. UTC | #2
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Hi Alex,

>

> On 05/30/2018 08:06 AM, Alex Bennée wrote:

>> This is still poorly documented by Travis but according to:

>>

>>   https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally

>>

>> their reference images are now hosted on Docker Hub. So we update the

>> FROM line to refer to the new default image. We also need a few

>> additional tweaks:

>>

>>   - re-enable deb-src lines for our build-dep install

>>   - add explicit PATH definition for tools

>

> I don't understand how this is related to QEMU testing, isn't it rather

> some Travis-ci bug? We don't need to use PhantomJS / Neo4j / Maven.


It's oddly constructed I'll grant you but I just set the path to what a
running image has. The normal image is started up with a full systemd
init whereas we drop directly into the shell.

>

>>   - force the build USER to be Travis

>>   - add clang to FEATURES for our test-clang machinery

>>

>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>> ---

>>  tests/docker/dockerfiles/travis.docker | 7 +++++--

>>  1 file changed, 5 insertions(+), 2 deletions(-)

>>

>> diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker

>> index 605b6e429b..6e90f033d5 100644

>> --- a/tests/docker/dockerfiles/travis.docker

>> +++ b/tests/docker/dockerfiles/travis.docker

>> @@ -1,8 +1,11 @@

>> -FROM quay.io/travisci/travis-ruby

>> +FROM travisci/ci-garnet:packer-1512502276-986baf0

>>  ENV DEBIAN_FRONTEND noninteractive

>>  ENV LANG en_US.UTF-8

>>  ENV LC_ALL en_US.UTF-8

>> +RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list

>>  RUN apt-get update

>>  RUN apt-get -y build-dep qemu

>>  RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools

>> -ENV FEATURES pyyaml

>> +ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

>> +ENV FEATURES clang pyyaml

>> +USER travis

>>



--
Alex Bennée
Philippe Mathieu-Daudé May 31, 2018, 11:08 p.m. UTC | #3
On 05/31/2018 05:14 PM, Alex Bennée wrote:
> 

> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> 

>> Hi Alex,

>>

>> On 05/30/2018 08:06 AM, Alex Bennée wrote:

>>> This is still poorly documented by Travis but according to:

>>>

>>>   https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally

>>>

>>> their reference images are now hosted on Docker Hub. So we update the

>>> FROM line to refer to the new default image. We also need a few

>>> additional tweaks:

>>>

>>>   - re-enable deb-src lines for our build-dep install

>>>   - add explicit PATH definition for tools

>>

>> I don't understand how this is related to QEMU testing, isn't it rather

>> some Travis-ci bug? We don't need to use PhantomJS / Neo4j / Maven.

> 

> It's oddly constructed I'll grant you but I just set the path to what a

> running image has. The normal image is started up with a full systemd

> init whereas we drop directly into the shell.


OK, can you add a comment about it? (so we don't remove what seems
unrelated).

> 

>>

>>>   - force the build USER to be Travis

>>>   - add clang to FEATURES for our test-clang machinery

>>>

>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>>> ---

>>>  tests/docker/dockerfiles/travis.docker | 7 +++++--

>>>  1 file changed, 5 insertions(+), 2 deletions(-)

>>>

>>> diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker

>>> index 605b6e429b..6e90f033d5 100644

>>> --- a/tests/docker/dockerfiles/travis.docker

>>> +++ b/tests/docker/dockerfiles/travis.docker

>>> @@ -1,8 +1,11 @@

>>> -FROM quay.io/travisci/travis-ruby

>>> +FROM travisci/ci-garnet:packer-1512502276-986baf0

>>>  ENV DEBIAN_FRONTEND noninteractive

>>>  ENV LANG en_US.UTF-8

>>>  ENV LC_ALL en_US.UTF-8

>>> +RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list

>>>  RUN apt-get update

>>>  RUN apt-get -y build-dep qemu

>>>  RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools

>>> -ENV FEATURES pyyaml


# Travis tools require PhantomJS / Neo4j / Maven accessible
# in their PATH (QEMU build won't access them).

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


>>> +ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

>>> +ENV FEATURES clang pyyaml

>>> +USER travis

>>>

> 

> 

> --

> Alex Bennée

>
diff mbox series

Patch

diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker
index 605b6e429b..6e90f033d5 100644
--- a/tests/docker/dockerfiles/travis.docker
+++ b/tests/docker/dockerfiles/travis.docker
@@ -1,8 +1,11 @@ 
-FROM quay.io/travisci/travis-ruby
+FROM travisci/ci-garnet:packer-1512502276-986baf0
 ENV DEBIAN_FRONTEND noninteractive
 ENV LANG en_US.UTF-8
 ENV LC_ALL en_US.UTF-8
+RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list
 RUN apt-get update
 RUN apt-get -y build-dep qemu
 RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools
-ENV FEATURES pyyaml
+ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ENV FEATURES clang pyyaml
+USER travis