diff options
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..5c61b8c0c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,96 @@ +dist: trusty +sudo: true +language: c +services: +- docker + +stages: +- test +- build +- name: packaging + if: branch = master AND type != pull_request AND type != cron +- name: nightlies + if: branch = master AND type = cron +- name: Integrity testing + if: branch = master AND type = cron + +jobs: + include: + - stage: test + name: C + install: sudo apt-get install -y libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev + script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto && $HOME/netdata/usr/sbin/netdata -W unittest + env: CFLAGS='-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1' + - name: dashboard.js + script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js + - name: lint .sh.in files + script: shellcheck --format=gcc $(find . -name '*.sh.in' -not -iwholename '*.git*') + - name: check checksums for kickstart files + script: ./tests/installer/checksums.sh + env: LOCAL_ONLY="true" + - name: coverity + install: sudo apt-get install -y zlib1g-dev uuid-dev libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev + script: ./coverity-install.sh && ./coverity-scan.sh || echo "Coverity failed :(" + if: type = cron + + - stage: build +# TODO: enable when travis OSX become stable. Probably after 12.01.2019 +# name: OSX +# install: brew install fakeroot ossp-uuid +# script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it +# os: osx +# - name: ubuntu 14.04 (not containerized) + name: ubuntu 14.04 (not containerized) + install: sudo apt-get install -y libcap2-bin zlib1g-dev uuid-dev fakeroot + script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME + - name: build container (alpine installation) + script: ./packaging/docker/build.sh + env: DEVEL="true" + - name: ubuntu 18.04 + lifecycle + script: docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:ubuntu1804" bats --tap tests/lifecycle.bats + - name: CentOS 7 + script: docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:centos7" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp + - name: CentOS 6 + script: docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:centos6" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp + + - stage: packaging + name: Create release (only on special commit msg) + install: + - sudo apt-get install -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot python-pip + - sudo apt install -y --only-upgrade docker-ce + - docker info + before_script: sudo pip install git-semver + script: ".travis/releaser.sh && .travis/labeler.sh" # labeler should be replaced with GitHub Actions when they hit GA + git: + depth: false + + - stage: nightlies + name: Nightly build + before_install: openssl aes-256-cbc -K $encrypted_8daf19481253_key -iv $encrypted_8daf19481253_iv -in .travis/gcs-credentials.json.enc -out .travis/gcs-credentials.json -d + install: + - sudo apt-get install -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot + - sudo apt install -y --only-upgrade docker-ce + - docker info + script: ".travis/nightlies.sh" + git: + depth: false + deploy: + provider: gcs + edge: + branch: gcs-ng + project_id: netdata-storage + credentials: .travis/gcs-credentials.json + bucket: "netdata-nightlies" + skip_cleanup: true + local_dir: "artifacts" + after_deploy: rm -f .travis/gcs-credentials.json + + - stage: Integrity testing + name: Kickstart files integrity testing + script: ./tests/installer/checksums.sh + +notifications: + webhooks: https://app.fossa.io/hooks/travisci + slack: + rooms: + - secure: "NuW1p7s+WGLcyhEceeiLRSV1JgAc6N47zgdSsYoxrjSFRQHDfc8jensypDcEJwgs1K2Hcve9iKRaAddEHEw7AkS6rie9gFR5HmmbKXfW2GFMqOr6maYTFsvaECPqiWk1n9/XnRLsAi5kZ8HxH+a8ldb/eaVoFQesY1jPXgh11BM5DwvpXjEtwg0WGASsKiymvnXFS3KcC+sR7Lln2GX1a8vfCX2I3TEmOedKMlSHUy5JilGGC3AWA0SWS8tR8PUH0u3dHL5j0RNIr1RO3Yx24QgUpg/YpvKymnW/iIIEOq2vb2mBhhiKEQjJ1djUL4VSPzjIDpUzThVpKaHk3syOp6W9qZEHKhR/sqjc5Yk2XRjsw1cM0nS60gaCgxtKhEMKWcjtvWf04oJAVrmcUwcYXj0eA+jgRCZl5VhyufK/fUJavjOfsQGjwhdjxQfwDCw33W17ypJUt4GZngdb6jbIhEOcKHSLQDu1vuHTw82hJJkthkmR59PX30qJdl/MEGcfVLdN/fkCokjR/qwfmkNwQm+wYSKsK/Jq4RgBT0/oZwY3e8nkCq2ov7lBbDO3/0rzQKWZ9Uy//tnoCM3vGhDwGHQxsHshv7g6KwdhYTcmm7WWWIucfLupcjFUO1HbRuJ+7ZnvxRRwKiV+MGkFT2SNJkS8q1/jCu9KGbmktd0WUSE=" |