summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-22 21:29:04 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-22 21:29:04 +0300
commit4c1f6560f60d0a03c29ee5bc3b5b2989146c80e4 (patch)
tree4ff9600e6340398b8f60cc64580e842fcb4bdcd0 /tools
parent7f2d20125a377f5d59ab9067a8f204d57de02b5b (diff)
downloadevol-hercules-4c1f6560f60d0a03c29ee5bc3b5b2989146c80e4.tar.gz
evol-hercules-4c1f6560f60d0a03c29ee5bc3b5b2989146c80e4.tar.bz2
evol-hercules-4c1f6560f60d0a03c29ee5bc3b5b2989146c80e4.tar.xz
evol-hercules-4c1f6560f60d0a03c29ee5bc3b5b2989146c80e4.zip
In ci scripts at first try clone from forks and if failed, from original repos.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/scripts/init.sh29
1 files changed, 24 insertions, 5 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index 677a3af..01df562 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -65,14 +65,33 @@ function aptget_install {
fi
}
+function gitclone1 {
+ echo git clone $2 $3
+ git clone $2 $3
+ if [ "$?" != 0 ]; then
+ echo git clone $1 $3
+ git clone $1 $3
+ return $?
+ fi
+ return $?
+}
+
function gitclone {
- git clone $*
+ export name1=$1/$2
+ export name2=${CI_BUILD_REPO##*@}
+ export name2=https://${name2%/*}/$2
+
+ gitclone1 "$name1" "$name2" $3
if [ "$?" != 0 ]; then
sleep 1s
- git clone $*
+ gitclone1 "$name1" "$name2" $3
if [ "$?" != 0 ]; then
sleep 3s
- git clone $*
+ gitclone1 "$name1" "$name2" $3
+ if [ "$?" != 0 ]; then
+ sleep 5s
+ gitclone1 "$name1" "$name2" $3
+ fi
fi
fi
check_error $?
@@ -151,12 +170,12 @@ function run_mplint {
function clone_tool {
rm -rf tools
- gitclone https://gitlab.com/evol/evol-tools.git tools
+ gitclone https://gitlab.com/evol evol-tools.git tools
}
function clone_servercode {
rm -rf server-code
- gitclone https://gitlab.com/evol/hercules.git server-code
+ gitclone https://gitlab.com/evol hercules.git server-code
}
function build_init {