summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-25 18:05:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-25 18:20:39 +0300
commit73de3fca3b7bf3b63a9b75c1204b75d6bbde8c1f (patch)
tree2624eb9a7eb200821c329f57f57bbb535de92d31
parentb81e9a00faf9fe71546dae658775625bddd7c2f0 (diff)
downloadmv-73de3fca3b7bf3b63a9b75c1204b75d6bbde8c1f.tar.gz
mv-73de3fca3b7bf3b63a9b75c1204b75d6bbde8c1f.tar.bz2
mv-73de3fca3b7bf3b63a9b75c1204b75d6bbde8c1f.tar.xz
mv-73de3fca3b7bf3b63a9b75c1204b75d6bbde8c1f.zip
Add updaterepos ci script.
-rw-r--r--.gitlab-ci.yml1
-rwxr-xr-xtools/ci/scripts/updaterepos.sh12
2 files changed, 13 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 877978a75..3ac47f60b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ before_script:
- cat /etc/os-release
- pwd
- mkdir logs
+ - tools/ci/scripts/updaterepos.sh
- tools/ci/scripts/dockerretry.sh apt-get update
- tools/ci/scripts/dockerretry.sh apt-get install -y -qq ${PACKAGES}
diff --git a/tools/ci/scripts/updaterepos.sh b/tools/ci/scripts/updaterepos.sh
new file mode 100755
index 000000000..d589d28a0
--- /dev/null
+++ b/tools/ci/scripts/updaterepos.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [[ ${CI_RUNNER_TAGS} != *"docker"* ]]; then
+ echo "Running from shell. Skipping update repos"
+ exit 0
+fi
+export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
+echo "${DATA}"
+if [ "$DATA" != "" ]; then
+ echo "Detected local runner"
+ sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
+fi