.gitlab-ci.yml 1.38 KB
Newer Older
1
services:
2
  - mysql:5.7
David Haynes's avatar
David Haynes committed
3

4
stages:
5
  - build
6

7 8 9 10
variables:
  MYSQL_DATABASE: go
  MYSQL_ROOT_PASSWORD: root

11 12
Go-py3.7:
  image: library/python:3.7
13
  stage: build
14
  script:
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    - apt-get update -qy
    - apt-get install -y redis-server
    - pip install pipenv
    - pipenv install -d --system --deploy
    - nohup redis-server &
    - cd go/
    - export GO_SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
    - export GO_DB_NAME="go"
    - export GO_ENV="production"
    - export GO_DB_USER="root"
    - export GO_DB_PASSWORD="root"
    - export GO_DB_HOST="mysql"
    - export GO_DB_PORT=3306
    - export GO_ALLOWED_HOSTS="*"
    - export GO_EMAIL_DOMAIN="@masonlive.gmu.edu"
    - export GO_CAS_URL="https://cas.srct.gmu.edu/"
    - export GO_EMAIL_HOST=
    - export GO_EMAIL_PORT=
    - export GO_EMAIL_HOST_USER=
    - export GO_EMAIL_HOST_PASSWORD=
    - export GO_EMAIL_FROM=
    - export GO_EMAIL_TO=
    - python manage.py makemigrations
    - python manage.py makemigrations go_ahead
    - python manage.py makemigrations go_back
    - python manage.py migrate
    - echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('root', 'root@srct.gmu.edu', 'root') " | python manage.py shell
David Haynes's avatar
David Haynes committed
42
    - echo "done :)"
43 44 45 46 47 48 49

Go-node11:
  image: library/node:11
  stage: build
  script:
    - yarn
    - yarn build