diff --git a/.travis.yml b/.travis.yml index f66ec5d62..e66ce1c46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,23 +85,6 @@ jobs: - cd pgq-processors && bundle install --gemfile="./Gemfile" && cd .. - cd pgq-processors && BUNDLE_GEMFILE=./Gemfile ./bin/bundle exec rspec && cd .. - - stage: stable package - if: branch != master OR tag =~ ^.*$ - env: CACHE_NAME=jessie_package - name: Stable Jessie Package - script: &build_jessie - - rm -vf config/database.yml - - docker build -t yeti-web -f ./ci/build_jessie.Dockerfile . - - docker run --network yeti-net --name yeti-web yeti-web && docker commit yeti-web yeti-web:built - deploy: - skip_cleanup: true - provider: script - script: docker run --name yeti-web-deploy yeti-web:built ci/deploy.sh "$API_ENDPOINT" jessie "${TRAVIS_TAG:0:3}" main /build/*.deb - on: - tags: true - condition: "$TRAVIS_TAG != *-master*" - repo: yeti-switch/yeti-web - - stage: stable package if: branch != master OR tag =~ ^.*$ env: CACHE_NAME=stretch_package @@ -119,19 +102,6 @@ jobs: condition: "$TRAVIS_TAG != *-master*" repo: yeti-switch/yeti-web - - stage: nightly package - if: branch = master - env: CACHE_NAME=jessie_package - name: Nightly Jessie Package - script: *build_jessie - deploy: - skip_cleanup: true - provider: script - script: docker run --name yeti-web-deploy yeti-web:built ci/deploy.sh "$API_ENDPOINT" jessie nightly main /build/*.deb - on: - all_branches: true - repo: yeti-switch/yeti-web - - stage: nightly package if: branch = master env: CACHE_NAME=stretch_package diff --git a/ci/README.md b/ci/README.md index d49874113..38b7a24be 100644 --- a/ci/README.md +++ b/ci/README.md @@ -1,11 +1,11 @@ # Building debian package -There are some non-standard requirements to build a package. E.g. Debian changelog is generated using custom tool that is installed from yeti repository. So it's advised to use docker to build package. Dockerfiles are `build_jessie.Dockerfile` and `build_stretch.Dockerfile` for building in jessie and stretch enviroment respectively. Building of a package involves building of the documentation, which is generated by doing api requests to a working application. This step requires working database. You can launch it using `ci/pgsql.Dockerfile`. Generally, the sequence of commands to build package is: +There are some non-standard requirements to build a package. E.g. Debian changelog is generated using custom tool that is installed from yeti repository. So it's advised to use docker to build package. Dockerfiles is `build_stretch.Dockerfile` for building in stretch enviroment respectively. Building of a package involves building of the documentation, which is generated by doing api requests to a working application. This step requires working database. You can launch it using `ci/pgsql.Dockerfile`. Generally, the sequence of commands to build package is: ```bash $ docker build -t pgsql_yeti -f ./ci/pgsql.Dockerfile . $ docker network create yeti-net $ docker run -d --network yeti-net -p 5432:5432 --name db pgsql_yeti -$ docker build -t yeti-web -f ./ci/build_jessie.Dockerfile . +$ docker build -t yeti-web -f ./ci/build_stretch.Dockerfile . $ docker run --network yeti-net --name yeti-web yeti-web ``` diff --git a/ci/build_jessie.Dockerfile b/ci/build_jessie.Dockerfile deleted file mode 100644 index affb0f310..000000000 --- a/ci/build_jessie.Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM debian:jessie - - -RUN apt-get update && apt-get -y dist-upgrade && apt-get -y --no-install-recommends install wget gnupg -RUN wget http://pkg.yeti-switch.org/key.gpg -O - | apt-key add - -RUN echo "deb http://pkg.yeti-switch.org/debian/jessie unstable main ext" >> /etc/apt/sources.list -RUN echo "deb http://deb.debian.org/debian buster main contrib non-free" >> /etc/apt/sources.list -RUN echo "Package: *\nPin: release n=buster\nPin-Priority: 50\n\nPackage: python-git python-gitdb python-smmap python-tzlocal\nPin: release n=buster\nPin-Priority: 500\n\n" | tee /etc/apt/preferences -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/ jessie-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 \ - ruby2.6 ruby2.6-dev zlib1g-dev libpq-dev python-yaml postgresql-client-11 \ - git-changelog python-setuptools lsb-release curl - -ADD . /build/yeti-web/ -RUN sed -i '/host/s/127\.0\.0\.1/db/' /build/yeti-web/config/database.build.yml - -WORKDIR /build/yeti-web/ -CMD make package -