Skip to content

Commit

Permalink
WIP: updating supported release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeDog committed Feb 25, 2019
1 parent e44d34d commit 94fa592
Show file tree
Hide file tree
Showing 15 changed files with 498 additions and 125 deletions.
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PACKAGE_NAME = libzbxpgsql
PACKAGE_VERSION = 1.1.0
PACKAGE_VERSION = 1.2.0

ZABBIX_VERSION = 3.2.3
ZABBIX_VERSION = 4.0.4

# args common to all 'docker run' commands
DOCKER_RUNARGS = -it --rm \
Expand All @@ -23,15 +23,15 @@ all: libzbxpgsql.so

# build module
libzbxpgsql.so:
$(DOCKER_RUN) $(PACKAGE_NAME)/build-debian-jessie build
$(DOCKER_RUN) $(PACKAGE_NAME)/build-debian-stretch build

# build docker images for compiling, testing and packaging the module
docker-images:
cd docker && make docker-images

# create source tarball
dist:
$(DOCKER_RUN) $(PACKAGE_NAME)/build-debian-jessie dist
$(DOCKER_RUN) $(PACKAGE_NAME)/build-debian-stretch dist

clean:
rm -rvf release
Expand All @@ -58,12 +58,9 @@ test-packages:
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.0-debian-jessie test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.0-ubuntu-trusty test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.0-ubuntu-xenial test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-centos-6 test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-centos-7 test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-debian-wheezy test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-debian-jessie test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-ubuntu-trusty test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-3.2-ubuntu-xenial test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-4.0-centos-7 test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-4.0-debian-stretch test_package
$(DOCKER_RUN) $(PACKAGE_NAME)/zabbix-4.0-ubuntu-bionic test_package

# run key compatibility tests (requires `make run-postgres`)
test-keys:
Expand All @@ -83,8 +80,10 @@ run-agent: libzbxpgsql.so
--link pg94:libzbxpgsql_pg94_1 \
--link pg95:libzbxpgsql_pg95_1 \
--link pg96:libzbxpgsql_pg96_1 \
--link pg10:libzbxpgsql_pg10_1 \
--link pg11:libzbxpgsql_pg11_1 \
--name libzbxpgsql_agent \
$(PACKAGE_NAME)/zabbix-3.2-debian-jessie agent
$(PACKAGE_NAME)/zabbix-4.0-debian-stretch agent

# start a test environment including each postgresql version and a zabbix agent
run-postgres:
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ services:
image: postgres:9.6
expose: [ 5432 ]
ports: [ "5496:5432" ]

pg10:
image: postgres:10
expose: [ 5432 ]
ports: [ "5410:5432" ]

pg11:
image: postgres:11
expose: [ 5432 ]
ports: [ "5411:5432" ]

60 changes: 28 additions & 32 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ docker-images: \
build-centos-7 \
build-debian-wheezy \
build-debian-jessie \
build-debian-stretch \
build-ubuntu-precise \
build-ubuntu-trusty \
build-ubuntu-xenial \
build-ubuntu-bionic \
zabbix-2.2-centos-6 \
zabbix-2.2-centos-7 \
zabbix-2.2-debian-wheezy \
Expand All @@ -33,21 +35,20 @@ docker-images: \
zabbix-3.0-debian-wheezy \
zabbix-3.0-ubuntu-trusty \
zabbix-3.0-ubuntu-xenial \
zabbix-3.2-centos-6 \
zabbix-3.2-centos-7 \
zabbix-3.2-debian-jessie \
zabbix-3.2-debian-wheezy \
zabbix-3.2-ubuntu-trusty \
zabbix-3.2-ubuntu-xenial
zabbix-4.0-centos-7 \
zabbix-4.0-debian-stretch\
zabbix-4.0-ubuntu-bionic

docker-images-update:
docker pull centos:6
docker pull centos:7
docker pull debian:wheezy
docker pull debian:jessie
docker pull debian:stretch
docker pull ubuntu:trusty
docker pull ubuntu:precise
docker pull ubuntu:xenial
docker pull ubuntu:bionic
make docker-images

build-centos-6:
Expand All @@ -74,6 +75,12 @@ build-debian-jessie:
-t libzbxpgsql/build-debian-jessie \
.

build-debian-stretch:
$(DOCKER_BUILD) \
-f build-debian-stretch.Dockerfile \
-t libzbxpgsql/build-debian-stretch \
.

build-ubuntu-precise:
$(DOCKER_BUILD) \
-f build-ubuntu-precise.Dockerfile \
Expand All @@ -92,6 +99,12 @@ build-ubuntu-xenial:
-t libzbxpgsql/build-ubuntu-xenial \
.

build-ubuntu-bionic:
$(DOCKER_BUILD) \
-f build-ubuntu-bionic.Dockerfile \
-t libzbxpgsql/build-ubuntu-bionic \
.

zabbix-2.2-centos-6:
$(DOCKER_BUILD) \
-f zabbix-2.2-centos-6.Dockerfile \
Expand Down Expand Up @@ -158,38 +171,21 @@ zabbix-3.0-ubuntu-xenial:
-t libzbxpgsql/zabbix-3.0-ubuntu-xenial \
.

zabbix-3.2-centos-6:
$(DOCKER_BUILD) \
-f zabbix-3.2-centos-6.Dockerfile \
-t libzbxpgsql/zabbix-3.2-centos-6 \
.

zabbix-3.2-centos-7:
zabbix-4.0-centos-7:
$(DOCKER_BUILD) \
-f zabbix-3.2-centos-7.Dockerfile \
-t libzbxpgsql/zabbix-3.2-centos-7 \
-f zabbix-4.0-centos-7.Dockerfile \
-t libzbxpgsql/zabbix-4.0-centos-7 \
.

zabbix-3.2-debian-wheezy:
zabbix-4.0-debian-stretch:
$(DOCKER_BUILD) \
-f zabbix-3.2-debian-wheezy.Dockerfile \
-t libzbxpgsql/zabbix-3.2-debian-wheezy \
-f zabbix-4.0-debian-stretch.Dockerfile \
-t libzbxpgsql/zabbix-4.0-debian-stretch \
.

zabbix-3.2-debian-jessie:
zabbix-4.0-ubuntu-bionic:
$(DOCKER_BUILD) \
-f zabbix-3.2-debian-jessie.Dockerfile \
-t libzbxpgsql/zabbix-3.2-debian-jessie \
-f zabbix-4.0-ubuntu-bionic.Dockerfile \
-t libzbxpgsql/zabbix-4.0-ubuntu-bionic \
.

zabbix-3.2-ubuntu-trusty:
$(DOCKER_BUILD) \
-f zabbix-3.2-ubuntu-trusty.Dockerfile \
-t libzbxpgsql/zabbix-3.2-ubuntu-trusty \
.

zabbix-3.2-ubuntu-xenial:
$(DOCKER_BUILD) \
-f zabbix-3.2-ubuntu-xenial.Dockerfile \
-t libzbxpgsql/zabbix-3.2-ubuntu-xenial \
.
25 changes: 25 additions & 0 deletions docker/build-debian-stretch.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM debian:stretch

ENV DEBIAN_FRONTEND noninteractive

# install dev tools
RUN apt-get update && apt-get -y install \
git \
devscripts \
debhelper \
dh-make \
rpm \
make \
gcc \
autoconf \
automake \
m4 \
libtool \
libpq-dev \
libconfig-dev \
vim \
&& rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
25 changes: 25 additions & 0 deletions docker/build-ubuntu-bionic.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:bionic

ENV DEBIAN_FRONTEND noninteractive

# install dev tools
RUN apt-get update && apt-get -y install \
git \
devscripts \
debhelper \
dh-make \
rpm \
make \
gcc \
autoconf \
automake \
m4 \
libtool \
libpq-dev \
libconfig-dev \
vim \
&& rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
10 changes: 0 additions & 10 deletions docker/zabbix-3.2-centos-6.Dockerfile

This file was deleted.

31 changes: 0 additions & 31 deletions docker/zabbix-3.2-debian-jessie.Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions docker/zabbix-3.2-ubuntu-trusty.Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM centos:7

RUN \
rpm -iv http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm \
rpm -iv http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm \
&& yum install -y zabbix-agent zabbix-get postgresql-libs libconfig \
&& yum clean all

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM debian:wheezy
FROM debian:stretch

ENV DEBIAN_FRONTEND noninteractive

RUN \
apt-get update -y \
&& apt-get -y install wget libpq5 libconfig9 \
&& wget -nv http://repo.zabbix.com/zabbix/3.2/debian/pool/main/z/zabbix-release/zabbix-release_3.2-1+wheezy_all.deb \
&& dpkg -i zabbix-release_3.2-1+wheezy_all.deb \
&& wget -nv http://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb \
&& dpkg -i zabbix-release_4.0-2+stretch_all.deb \
&& apt-get -q update \
&& apt-get -y install zabbix-agent zabbix-get \
&& rm -rf /var/lib/apt/lists/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:xenial
FROM ubuntu:bionic

ENV DEBIAN_FRONTEND noninteractive

RUN \
apt-get -q update \
&& apt-get -y install wget libpq5 libconfig9 \
&& wget -nv http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb \
&& dpkg -i zabbix-release_3.2-1+xenial_all.deb \
&& wget -nv http://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-2+bionic_all.deb \
&& dpkg -i zabbix-release_4.0-2+bionic_all.deb \
&& apt-get -q update \
&& apt-get -y install zabbix-agent zabbix-get

Expand Down
Loading

0 comments on commit 94fa592

Please sign in to comment.