diff options
-rw-r--r-- | .travis.yml | 10 | ||||
-rwxr-xr-x | .travis/containerized_build.sh | 11 | ||||
-rw-r--r-- | installer/netdata-updater.sh | 2 | ||||
-rwxr-xr-x | tests/lifecycle.sh | 30 |
4 files changed, 36 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml index 6484b29ab3..17d6f38e6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,14 +35,14 @@ jobs: - 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: alpine + lifecycle + script: docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:alpine" ./tests/lifecycle.sh - name: ubuntu 18.04 - script: ".travis/containerized_build.sh ubuntu1804" + script: docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:ubuntu1804" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp - name: CentOS 7 - script: ".travis/containerized_build.sh centos7" + 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: ".travis/containerized_build.sh centos6" - - name: alpine - script: ".travis/containerized_build.sh alpine" + 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 diff --git a/.travis/containerized_build.sh b/.travis/containerized_build.sh deleted file mode 100755 index f2d730176b..0000000000 --- a/.travis/containerized_build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -if [ ! -f .gitignore ] -then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 -fi - -docker run -it -v "${PWD}:/code:rw" -w /code "netdata/os-test:$1" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp diff --git a/installer/netdata-updater.sh b/installer/netdata-updater.sh index a09a405d4c..1f02877e9e 100644 --- a/installer/netdata-updater.sh +++ b/installer/netdata-updater.sh @@ -97,7 +97,7 @@ update() { git stash >&3 git fetch --all >&3 git fetch --tags >&3 - git checkout origin/master >&3 + git checkout master >&3 git reset --hard origin/master >&3 git pull >&3 diff --git a/tests/lifecycle.sh b/tests/lifecycle.sh new file mode 100755 index 0000000000..5ba7db654e --- /dev/null +++ b/tests/lifecycle.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +if [ ! -f .gitignore ] +then + echo "Run as ./tests/$(basename "$0") from top level directory of git repository" + exit 1 +fi + +if ! git config user.name; then + git config user.email "test@example.com" + git config user.name "test" +fi + +echo "========= INSTALL =========" +./netdata-installer.sh --dont-wait --dont-start-it --install /tmp &>/dev/null + +echo "========= ADD GARBAGE =========" +touch test +git add test +git commit -m 'test commit' +touch new_file +git status + +echo "========= UPDATE =========" +./netdata-updater.sh + +#echo "========= UNINSTALL =========" +#./netdata-uninstaller.sh |