From 066428f02b713174d617c53fa56d158eacf2fd5d Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 21 Jan 2020 22:21:20 +0200 Subject: [PATCH] Packages for debian 10 --- .travis.yml | 47 ++++++++++++++++++++++++++++++-------- ci/build_buster.Dockerfile | 19 +++++++++++++++ 2 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 ci/build_buster.Dockerfile diff --git a/.travis.yml b/.travis.yml index 7c76f1d..fded2cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,29 +14,56 @@ jobs: - stage: stable package if: branch != master OR tag =~ ^.*$ env: CACHE_NAME=stretch_package - name: Stable Stretch Package - script: &1 - - docker build -t yeti-lb -f ./ci/build_stretch.Dockerfile . - - docker run --name yeti-lb yeti-lb && docker commit yeti-lb yeti-lb:built + name: Stable package Debian 9 + script: &build_stretch + - docker build -t yeti-lb-9 -f ./ci/build_stretch.Dockerfile . + - docker run --name yeti-lb-9 yeti-lb-9 && docker commit yeti-lb-9 yeti-lb-9:built deploy: skip_cleanup: true provider: script - script: docker run --name yeti-lb-deploy yeti-lb:built ci/deploy.sh "$API_ENDPOINT" - stretch "${TRAVIS_TAG:0:3}" main /build/*.deb + script: docker run --name yeti-lb-9-deploy yeti-lb-9:built ci/deploy.sh "$API_ENDPOINT" stretch "${TRAVIS_TAG%.*}" main /build/*.deb on: tags: true condition: "$TRAVIS_TAG != *-master*" repo: yeti-switch/yeti-lb + - stage: stable package + if: branch != master OR tag =~ ^.*$ + env: CACHE_NAME=buster_package + name: Stable package Debian 10 + script: &build_buster + - docker build -t yeti-lb-10 -f ./ci/build_buster.Dockerfile . + - docker run --name yeti-lb-10 yeti-lb-10 && docker commit yeti-lb-10 yeti-lb-10:built + deploy: + skip_cleanup: true + provider: script + script: docker run --name yeti-lb-10-deploy yeti-lb-10:built ci/deploy.sh "$API_ENDPOINT" buster "${TRAVIS_TAG%.*}" main /build/*.deb + on: + tags: true + condition: "$TRAVIS_TAG != *-master*" + repo: yeti-switch/yeti-lb + - stage: nightly package if: branch = master env: CACHE_NAME=stretch_package - name: Nightly Stretch Package - script: *1 + name: Nightly package Debian 9 + script: *build_stretch + deploy: + skip_cleanup: true + provider: script + script: docker run --name yeti-lb-9-deploy yeti-lb-9:built ci/deploy.sh "$API_ENDPOINT" stretch nightly main /build/*.deb + on: + all_branches: true + repo: yeti-switch/yeti-lb + + - stage: nightly package + if: branch = master + env: CACHE_NAME=buster_package + name: Nightly package Debian 10 + script: *build_buster deploy: skip_cleanup: true provider: script - script: docker run --name yeti-lb-deploy yeti-lb:built ci/deploy.sh "$API_ENDPOINT" - stretch nightly main /build/*.deb + script: docker run --name yeti-lb-10-deploy yeti-lb-10:built ci/deploy.sh "$API_ENDPOINT" buster nightly main /build/*.deb on: all_branches: true repo: yeti-switch/yeti-lb diff --git a/ci/build_buster.Dockerfile b/ci/build_buster.Dockerfile new file mode 100644 index 0000000..2cc8561 --- /dev/null +++ b/ci/build_buster.Dockerfile @@ -0,0 +1,19 @@ +FROM debian:buster + + +RUN apt-get update && apt-get -y dist-upgrade && apt-get -y --no-install-recommends install wget gnupg +RUN wget -O - http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add - +RUN wget http://pkg.yeti-switch.org/key.gpg -O - | apt-key add - +RUN echo "deb http://deb.kamailio.org/kamailio52 buster main" >> /etc/apt/sources.list +RUN echo "deb http://pkg.yeti-switch.org/debian/buster unstable main ext" >> /etc/apt/sources.list +RUN wget --no-check-certificate https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" >> /etc/apt/sources.list + +RUN apt-get update && apt-get -y --no-install-recommends install build-essential devscripts \ + ca-certificates apt-transport-https debhelper fakeroot lintian python-jinja2 \ + git-changelog python-setuptools lsb-release curl + +ADD . /build/yeti-lb/ + +WORKDIR /build/yeti-lb/ +CMD make package +