run-updater-check.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. echo ">>> Installing CI support packages..."
  3. sh -x .github/scripts/ci-support-pkgs.sh
  4. mkdir -p /etc/cron.daily # Needed to make auto-update checking work correctly on some platforms.
  5. echo ">>> Installing Netdata..."
  6. sh -x packaging/installer/kickstart.sh --dont-wait --build-only --dont-start-it --disable-telemetry "${EXTRA_INSTALL_FLAGS:+--local-build-options "${EXTRA_INSTALL_FLAGS}"}" || exit 1
  7. echo "::group::>>> Pre-Update Environment File Contents"
  8. cat /etc/netdata/.environment
  9. echo "::endgroup::"
  10. echo "::group::>>> Pre-Update Netdata Build Info"
  11. netdata -W buildinfo
  12. echo "::endgroup::"
  13. echo ">>> Updating Netdata..."
  14. export NETDATA_BASE_URL="http://localhost:8080" # Pull the tarball from the local web server.
  15. echo 'NETDATA_ACCEPT_MAJOR_VERSIONS="1 9999"' > /etc/netdata/netdata-updater.conf
  16. timeout 3600 sh -x packaging/installer/netdata-updater.sh --not-running-from-cron --no-updater-self-update
  17. case "$?" in
  18. 124) echo "!!! Updater timed out." ; exit 1 ;;
  19. 0) ;;
  20. *) echo "!!! Updater failed." ; exit 1 ;;
  21. esac
  22. echo "::group::>>> Post-Update Environment File Contents"
  23. cat /etc/netdata/.environment
  24. echo "::endgroup::"
  25. echo "::group::>>> Post-Update Netdata Build Info"
  26. netdata -W buildinfo
  27. echo "::endgroup::"
  28. echo ">>> Checking if update was successful..."
  29. sh -x .github/scripts/check-updater.sh || exit 1