Browse Source

Test integrity of dashboard.js (#4715)

* releaser needs to be on branch and not in deteached state

* dashboard.js integrity test; fix configure.ac

* fix key in travis config

* fix builder image name

* verbose diff

* revert #4707
Paweł Krupa 6 years ago
parent
commit
8d90857179
5 changed files with 9 additions and 12 deletions
  1. 2 0
      .travis.yml
  2. 2 0
      .travis/releaser.sh
  3. 4 4
      build/build.sh
  4. 1 1
      configure.ac
  5. 0 7
      web/gui/dashboard.js

+ 2 - 0
.travis.yml

@@ -19,6 +19,8 @@ jobs:
     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: coverity
     install: sudo apt-get install -y zlib1g-dev uuid-dev libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev
     script: ./coverity-scan.sh || echo "Coverity failed :("

+ 2 - 0
.travis/releaser.sh

@@ -34,6 +34,8 @@ export GIT_USER="netdatabot"
 echo "--- Initialize git configuration ---"
 git config user.email "${GIT_MAIL}"
 git config user.name "${GIT_USER}"
+git checkout master
+git pull
 
 echo "---- FIGURING OUT TAGS ----"
 # tagger.sh is sourced since we need environment variables it sets

+ 4 - 4
build/build.sh

@@ -10,13 +10,13 @@ if [ "$IS_CONTAINER" != "" ]; then
   make dist
   rm -rf autom4te.cache
 else
-  if [[ "$(docker images -q netdata-gcc-builder:latest 2> /dev/null)" == "" ]]; then
-      docker build -t netdata-gcc-builder:latest -f build/Dockerfile .
+  if [[ "$(docker images -q netdata-builder:latest 2> /dev/null)" == "" ]]; then
+      docker build -t netdata-builder:latest -f build/Dockerfile .
   fi
   docker run --rm -it \
     --env IS_CONTAINER=TRUE \
     --volume "${PWD}:/project:Z" \
     --workdir "/project" \
-    netdata:gcc \
-    ./.travis/build.sh
+    netdata-builder:latest \
+    ./build/build.sh
 fi

+ 1 - 1
configure.ac

@@ -6,7 +6,7 @@ AC_PREREQ(2.60)
 
 define([VERSION_MAJOR], [1])
 define([VERSION_MINOR], [11])
-define([VERSION_FIX], [0])
+define([VERSION_FIX], [1])
 define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
 define([VERSION_SUFFIX], [_rolling])
 

+ 0 - 7
web/gui/dashboard.js

@@ -805,13 +805,6 @@ NETDATA.unitsConversion = {
             'GB/s': 1024 * 1024,
             'TB/s': 1024 * 1024 * 1024
         },
-        'B': {
-            'B': 1,
-            'KB': 1024,
-            'MB': 1024 * 1024,
-            'GB': 1024 * 1024 * 1024,
-            'TB': 1024 * 1024 * 1024 * 1024,
-            'PB': 1024 * 1024 * 1024 * 1024 * 1024
         'KB': {
             'B': 1 / 1024,
             'KB': 1,