.travis.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. dist: focal
  3. language: c
  4. addons:
  5. apt:
  6. packages: ['moreutils']
  7. env:
  8. global:
  9. - RELEASE_CHANNEL=nightly
  10. before_install:
  11. - exec > >(ts -s '%H:%M:%.S ') 2>&1
  12. - source .travis/utils.sh
  13. # Install dependencies for all, once
  14. #
  15. install:
  16. - sudo apt-get install -y libuv1-dev liblz4-dev libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python3-pip
  17. - sudo pip3 install git-semver==0.3.2 # 11/Sep/2019: git-semver tip was broken, so we had to force last good run of it
  18. - source tests/installer/slack.sh
  19. - export NOTIF_CHANNEL="automation-beta"
  20. - if [ "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export NOTIF_CHANNEL="automation"; fi;
  21. - export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1)"
  22. - export LATEST_RELEASE_VERSION="$(cat packaging/version | cut -d'-' -f1)"
  23. - export LATEST_RELEASE_DATE="$(git log -1 --format=%aD "${LATEST_RELEASE_VERSION}" | cat)"
  24. - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1,2 | sed -e 's/-/./g').latest"; fi;
  25. - export DEPLOY_REPO="netdata" # Default production packaging repository
  26. - export PACKAGING_USER="netdata" # Standard package cloud account
  27. - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export DEPLOY_REPO="netdata-edge"; fi;
  28. - export PACKAGE_CLOUD_RETENTION_DAYS=30
  29. - if [ ! "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export DEPLOY_REPO="netdata-devel"; fi;
  30. # These are release-related artifacts and have to be evaluated before we start doing conditional checks inside stages
  31. - source ".travis/tagger.sh"
  32. - export GIT_TAG="$(git tag --points-at)"
  33. - git submodule update --init --recursive
  34. # Setup notification system
  35. #
  36. notifications:
  37. webhooks:
  38. urls:
  39. - https://app.fossa.io/hooks/travisci
  40. # Define the stage sequence and conditionals
  41. #
  42. stages:
  43. # Mandatory runs, we always want these executed
  44. - name: Build process
  45. if: commit_message =~ /^((?!\[Package (amd64|arm64|i386) (DEB|RPM)( .*)?\]).)*$/
  46. # Define stage implementation details
  47. #
  48. jobs:
  49. # This is a hook to help us introduce "soft" errors on our process
  50. allow_failures:
  51. - env: ALLOW_SOFT_FAILURE_HERE=true
  52. include:
  53. # Ensure netdata code builds successfully
  54. - stage: Build process
  55. name: Standard netdata build
  56. script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
  57. env: CFLAGS='-O1 -Wall -Wextra -Wformat-signedness -fstack-protector-all -fno-common -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1'
  58. after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)"