-
Notifications
You must be signed in to change notification settings - Fork 1
/
prepare-env.sh
35 lines (33 loc) · 1.49 KB
/
prepare-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
if [ -z $GITLAB_CI ]; then echo "This file is meant to be used by GitLab CI only." && exit 1; else echo "Ok, found CI environment"; fi
npm config set cache $PWD/.npm --global
apt-get install sudo
echo "root ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/docker && chmod 0440 /etc/sudoers.d/docker
export GOROOT=/goroot
export GOPATH=$CI_PROJECT_DIR/gopath/
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin:/gopath/bin
cd $GOPATH/src/github.com/FabLabBerlin/localmachines
echo "Waiting for MySQL." && sleep 10
sed -e "s/mysqlhost = localhost/mysqlhost = mysql/g" tests/conf/app.example.conf > tests/conf/app.conf
mysql --user=root --host=mysql --password="$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE" < fabsmith_template.sql
glide install
go get github.com/FabLabBerlin/easylab-lib
go get github.com/FabLabBerlin/easylab-gw
go get github.com/astaxie/beego
go get github.com/go-sql-driver/mysql
go get github.com/lib/pq
go get github.com/smartystreets/goconvey/convey
ln -sfn $GOPATH/src/github.com/FabLabBerlin/easylab-gw $CI_PROJECT_DIR/../easylab-gw
ln -sfn $GOPATH/src/github.com/FabLabBerlin/easylab-lib $CI_PROJECT_DIR/../easylab-lib
ls -l $GOPATH/src/github.com/FabLabBerlin/
cd $GOPATH/src/github.com/FabLabBerlin/localmachines/clients/admin
npm install
bower install --allow-root
cd $GOPATH/src/github.com/FabLabBerlin/localmachines/clients/machines
npm install
cd $GOPATH/src/github.com/FabLabBerlin/localmachines/clients/signup
npm install
bower install --allow-root
grunt prod
echo PATH: $PATH
echo GOPATH: $GOPATH