mirror of
https://github.com/darksaid98/ubuntu-server-setup.git
synced 2026-12-03 06:28:58 +00:00
Use xenial for travis (#11)
* Use Ubuntu Xenial for Travis CI * Fix CI tests * Ensure NTP time is synced https://askubuntu.com/a/1049810
This commit is contained in:
1 parent
d8eb1c23b9
commit
ce73240765
3 files changed
+10
-3
No files matched your search
+2
-2
@@ -2,7 +2,7 @@ language: generic
|
|||||||
sudo: required
|
sudo: required
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- dist: trusty
|
- dist: xenial
|
||||||
sudo: required
|
sudo: required
|
||||||
# Use https (public access) instead of git for git-submodules. This modifies only Travis-CI behavior
|
# Use https (public access) instead of git for git-submodules. This modifies only Travis-CI behavior
|
||||||
git:
|
git:
|
||||||
@@ -13,4 +13,4 @@ before_install:
|
|||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
script:
|
script:
|
||||||
- bash -c 'shopt -s globstar; shellcheck ./*.sh; shellcheck ./tests/*.sh'
|
- bash -c 'shopt -s globstar; shellcheck ./*.sh; shellcheck ./tests/*.sh'
|
||||||
- bash tests/unit-tests.sh -skip
|
- bash tests/unit-tests.sh -s
|
||||||
@@ -121,6 +121,11 @@ function configureNTP() {
|
|||||||
else
|
else
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get --assume-yes install ntp
|
sudo apt-get --assume-yes install ntp
|
||||||
|
|
||||||
|
# force NTP to sync
|
||||||
|
sudo service ntp stop
|
||||||
|
sudo ntpd -gq
|
||||||
|
sudo service ntp start
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
while getopts "skip" opt; do
|
while getopts "s" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
s) SKIP_SETUP=true ;;
|
s) SKIP_SETUP=true ;;
|
||||||
|
*) echo "usage: $0 [-v] [-r]" >&2
|
||||||
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user