diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-09-12 19:09:26 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2018-09-12 20:09:26 +0300 |
commit | 70117d8e5a1dcf5c0cb77c014077f3c67f848efe (patch) | |
tree | 7f175c5e211759154c6567029e879db0ad2dee30 | |
parent | 1ef5cd1bb3000537c8bf126b698f8a5a48e6b97b (diff) |
CI builds in containers (#4174)
* builds in containers
* fix build problems
-rw-r--r-- | .travis.yml | 13 | ||||
-rwxr-xr-x | .travis/containerized_build.sh | 7 | ||||
-rw-r--r-- | .travis/images/Dockerfile.alpine | 5 | ||||
-rw-r--r-- | .travis/images/Dockerfile.centos6 | 5 | ||||
-rw-r--r-- | .travis/images/Dockerfile.centos7 | 5 | ||||
-rw-r--r-- | .travis/images/Dockerfile.ubuntu1804 | 6 |
6 files changed, 39 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index a64e380e34..64e4988d09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,18 @@ jobs: # - name: "Node.js" # script: tests/run_nodejs.sh - stage: "build" - name: "linux" + name: "ubuntu 14.04 (not containerized)" install: sudo apt-get install -y libcap2-bin zlib1g-dev uuid-dev fakeroot - script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it + script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME + - name: "ubuntu 18.04" + script: ./.travis/containerized_build.sh ubuntu1804 + - name: "CentOS 7" + script: ./.travis/containerized_build.sh centos7 + - name: "CentOS 6" + script: ./.travis/containerized_build.sh centos6 +# TODO: cannot run installer without bash +# - name: "alpine" +# script: ./.travis/containerized_build.sh alpine - name: "OSX" install: brew install fakeroot ossp-uuid script: diff --git a/.travis/containerized_build.sh b/.travis/containerized_build.sh new file mode 100755 index 0000000000..8beb36d6c6 --- /dev/null +++ b/.travis/containerized_build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +docker build -t dev-image -f .travis/images/Dockerfile.$1 . + +docker run -it -w /code dev-image ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp diff --git a/.travis/images/Dockerfile.alpine b/.travis/images/Dockerfile.alpine new file mode 100644 index 0000000000..b9df9afd84 --- /dev/null +++ b/.travis/images/Dockerfile.alpine @@ -0,0 +1,5 @@ +FROM alpine:latest + +RUN apk add gcc make autoconf automake pkgconfig zlib-dev libuuid git + +COPY . /code diff --git a/.travis/images/Dockerfile.centos6 b/.travis/images/Dockerfile.centos6 new file mode 100644 index 0000000000..c286fb95c1 --- /dev/null +++ b/.travis/images/Dockerfile.centos6 @@ -0,0 +1,5 @@ +FROM centos:6 + +RUN yum install -y gcc make autoconf automake pkg-config zlib-devel libuuid-devel git + +COPY . /code diff --git a/.travis/images/Dockerfile.centos7 b/.travis/images/Dockerfile.centos7 new file mode 100644 index 0000000000..d94359dec0 --- /dev/null +++ b/.travis/images/Dockerfile.centos7 @@ -0,0 +1,5 @@ +FROM centos:7 + +RUN yum install -y gcc make autoconf automake pkg-config zlib-devel libuuid-devel git + +COPY . /code diff --git a/.travis/images/Dockerfile.ubuntu1804 b/.travis/images/Dockerfile.ubuntu1804 new file mode 100644 index 0000000000..30ac7cf71e --- /dev/null +++ b/.travis/images/Dockerfile.ubuntu1804 @@ -0,0 +1,6 @@ +FROM ubuntu:18.04 + +RUN apt-get update && \ + apt-get install -y gcc make autoconf automake pkg-config zlib1g-dev uuid-dev git + +COPY . /code |