Commit 0d472346 authored by David Haynes's avatar David Haynes
Browse files

Update gitlab-ci based on nander13's script

- right now it's the same -- let's see if it works
parent 9facc129
types: image: ubuntu:14.04
- build
- test
build_Go: services:
type: build - mysql:latest
script: echo Building!
test_Go: variables:
type: test MYSQL_DATABASE: go
script: echo Testing! MYSQL_ROOT_PASSWORD: root
- apt-get update -qy
- apt-get install -y python-dev python-pip python-pip libldap2-dev mysql-client libmysqlclient-dev python-mysqldb libsasl2-dev libjpeg-dev git
- pip install -r requirements.txt
- cp go/settings/ go/settings/
- cp go/settings/ go/settings/
- export SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
- sed -i go/settings/ -e 's/DB_NAME.*/DB_NAME = \"go\"/'
- sed -i go/settings/ -e 's/DB_USER.*/DB_USER = \"root\"/'
- sed -i go/settings/ -e 's/DB_PASSWORD.*/DB_PASSWORD = \"root\"/'
- sed -i go/settings/ -e 's/DB_HOST.*/DB_HOST = \"mysql\"/'
- sed -i go/settings/ -e 's/SECRET_KEY.*/SECRET_KEY = \"${SECRET_KEY}\"/'
- cd go
- export DJANGO_DEBUG="True"
- python makemigrations
- python migrate
- echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('root', '', 'root') " | python ./ shell
- python test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment