Commit 57d48fe4 authored by Zack Wong's avatar Zack Wong
Browse files

fix tabs to spaces

parent 0e5f40d1
stages:
- test
- deploy
- test
- deploy
variables:
DB_ENGINE : django.db.backends.sqlite3
DB_ENGINE : django.db.backends.sqlite3
before_script:
- echo "preparing environment"
- virtualenv env -p `which python3`
- . env/bin/activate
- pip install -r pip-packages.txt
- echo "preparing environment"
- virtualenv env -p `which python3`
- . env/bin/activate
- pip install -r pip-packages.txt
run_tests:
stage: test
script:
- echo "Running tests"
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- python src/manage.py check
stage: test
script:
- echo "Running tests"
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- python src/manage.py check
deploy_testing:
stage: deploy
tags:
- test
variables:
DB_NAME : /var/www/test/$CI_COMMIT_REF_NAME/.db/members.db
DEPLOY_HOST : $CI_COMMIT_REF_NAME.test.ucc.asn.au
SHORT_ENV_NAME : TEST
script:
- echo "Deploy to test"
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
- mkdir .db
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py
- ln -srT ./ /var/www/test/$CI_COMMIT_REF_NAME
- python src/manage.py collectstatic
- python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
environment:
name: test/$CI_COMMIT_REF_NAME
url: https://$CI_COMMIT_REF_NAME.test.ucc.asn.au
on_stop: stop_testing
except:
- master
stage: deploy
tags:
- test
variables:
DB_NAME : /var/www/test/$CI_COMMIT_REF_NAME/.db/members.db
DEPLOY_HOST : $CI_COMMIT_REF_NAME.test.ucc.asn.au
SHORT_ENV_NAME : TEST
script:
- echo "Deploy to test"
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
- mkdir .db
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py
- ln -srT ./ /var/www/test/$CI_COMMIT_REF_NAME
- python src/manage.py collectstatic
- python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
environment:
name: test/$CI_COMMIT_REF_NAME
url: https://$CI_COMMIT_REF_NAME.test.ucc.asn.au
on_stop: stop_testing
except:
- master
deploy_staging:
stage: deploy
tags:
- stage
variables:
DB_NAME : /var/www/stage/.db/members.db
DEPLOY_HOST : staging.test.ucc.asn.au
SHORT_ENV_NAME : STAGE
script:
- echo "Deploy to staging"
- rm -f /services/$CI_PROJECT_NAME
- rm -f /etc/uwsgi/vassals/stage.ini
- ln -srT ./ /services/$CI_PROJECT_NAME
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py
- python src/manage.py collectstatic
- python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/stage.skel /etc/uwsgi/vassals/stage.ini
environment:
name: stage
url: https://stage.test.ucc.asn.au
only:
- master
stage: deploy
tags:
- stage
variables:
DB_NAME : /var/www/stage/.db/members.db
DEPLOY_HOST : staging.test.ucc.asn.au
SHORT_ENV_NAME : STAGE
script:
- echo "Deploy to staging"
- rm -f /services/$CI_PROJECT_NAME
- rm -f /etc/uwsgi/vassals/stage.ini
- ln -srT ./ /services/$CI_PROJECT_NAME
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py
- python src/manage.py collectstatic
- python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/stage.skel /etc/uwsgi/vassals/stage.ini
environment:
name: stage
url: https://stage.test.ucc.asn.au
only:
- master
stop_testing:
stage: deploy
variables:
GIT_STRATEGY: none
when: manual
environment:
name: test/$CI_COMMIT_REF_NAME
action: stop
except:
- master
script:
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
stage: deploy
variables:
GIT_STRATEGY: none
when: manual
environment:
name: test/$CI_COMMIT_REF_NAME
action: stop
except:
- master
script:
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
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