Skip to content
Snippets Groups Projects
Commit 52adea14 authored by coffee's avatar coffee
Browse files

Merge remote-tracking branch 'origin/master' into coffee-testing

parents da4e93bb e3a2e62b
Branches
No related merge requests found
...@@ -18,31 +18,40 @@ run_tests: ...@@ -18,31 +18,40 @@ run_tests:
- echo "Running tests" - echo "Running tests"
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py - envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- python src/manage.py check - python src/manage.py check
only:
- /^.*-test(ing)?$/
- /^(test|devops)\/.*$/
- master
deploy_testing: deploy_testing:
stage: deploy stage: deploy
tags: tags:
- test - test
variables: variables:
DB_NAME : /var/www/test/$CI_COMMIT_REF_NAME/.db/members.db AD_DOMAIN : ad.v.ucc.asn.au
DEPLOY_HOST : $CI_COMMIT_REF_NAME.test.ucc.asn.au AD_BASEDN : DC=AD,DC=v,DC=ucc,DC=asn,DC=AU
DB_NAME : /var/www/test/$CI_COMMIT_REF_SLUG/.db/members.db
DEPLOY_HOST : $CI_COMMIT_REF_SLUG.test.ucc.asn.au
SHORT_ENV_NAME : TEST SHORT_ENV_NAME : TEST
script: script:
- echo "Deploy to test" - echo "Deploy to test"
- rm -f /var/www/test/$CI_COMMIT_REF_NAME - rm -f /var/www/test/$CI_COMMIT_REF_SLUG
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini - rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
- mkdir .db - mkdir .db
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py - envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py - chmod 600 src/gms/settings_local.py
- ln -srT ./ /var/www/test/$CI_COMMIT_REF_NAME - ln -srT ./ /var/www/test/$CI_COMMIT_REF_SLUG
- python src/manage.py collectstatic - python src/manage.py collectstatic
- python src/manage.py makemigrations - python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb - python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini - ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
environment: environment:
name: test/$CI_COMMIT_REF_NAME name: test/$CI_COMMIT_REF_SLUG
url: https://$CI_COMMIT_REF_NAME.test.ucc.asn.au url: https://$CI_COMMIT_REF_SLUG.test.ucc.asn.au
on_stop: stop_testing on_stop: stop_testing
only:
- /^.*-test(ing)?$/
- /^(test|devops)\/.*$/
except: except:
- master - master
- merge_requests - merge_requests
...@@ -52,6 +61,8 @@ deploy_staging: ...@@ -52,6 +61,8 @@ deploy_staging:
tags: tags:
- stage - stage
variables: variables:
AD_DOMAIN : ad.v.ucc.asn.au
AD_BASEDN : DC=AD,DC=v,DC=ucc,DC=asn,DC=AU
DB_NAME : /var/www/stage/.db/members.db DB_NAME : /var/www/stage/.db/members.db
DEPLOY_HOST : stage.test.ucc.asn.au DEPLOY_HOST : stage.test.ucc.asn.au
SHORT_ENV_NAME : STAGE SHORT_ENV_NAME : STAGE
...@@ -78,10 +89,13 @@ stop_testing: ...@@ -78,10 +89,13 @@ stop_testing:
GIT_STRATEGY: none GIT_STRATEGY: none
when: manual when: manual
environment: environment:
name: test/$CI_COMMIT_REF_NAME name: test/$CI_COMMIT_REF_SLUG
action: stop action: stop
only:
- /^.*-test(ing)?$/
- /^(test|devops)\/.*$/
except: except:
- master - master
script: script:
- rm -f /var/www/test/$CI_COMMIT_REF_NAME - rm -f /var/www/test/$CI_COMMIT_REF_SLUG
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini - rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
uccportal - the UCC Computer Controlled Proletarian Organisational Roster That Accesses LDAP [was GMS - Gumby Management System] uccportal - the UCC Computer Controlled Proletarian Organisational Roster That Accesses LDAP [was GMS - Gumby Management System]
================================================================================================================================ ================================================================================================================================
[![pipeline status](https://gitlab.ucc.asn.au/frekk/uccportal/badges/master/pipeline.svg)](https://gitlab.ucc.asn.au/frekk/uccportal/commits/master)
This is designed to be the ultimate membership management suite for UCC. Signups are electronic and automatic, data is able to be conveniently stored in the member database and some of it is even automatically validated. This is designed to be the ultimate membership management suite for UCC. Signups are electronic and automatic, data is able to be conveniently stored in the member database and some of it is even automatically validated.
...@@ -185,4 +186,4 @@ from the Actions menu. ...@@ -185,4 +186,4 @@ from the Actions menu.
Credits Credits
------- -------
- Adapted from `Gumby Management System` written by David Adam <zanchey@ucc.gu.uwa.edu.au> - Adapted from `Gumby Management System` written by David Adam <zanchey@ucc.gu.uwa.edu.au>
- Derived from MemberDB by Danni Madeley - Derived from MemberDB by Danni Madeley
\ No newline at end of file
...@@ -49,7 +49,7 @@ from django_auth_ldap.config import LDAPSearch, ActiveDirectoryGroupType, LDAPGr ...@@ -49,7 +49,7 @@ from django_auth_ldap.config import LDAPSearch, ActiveDirectoryGroupType, LDAPGr
# this could be ad.ucc.gu.uwa.edu.au but that doesn't resolve externally - # this could be ad.ucc.gu.uwa.edu.au but that doesn't resolve externally -
# useful for testing, but should be changed in production so failover works # useful for testing, but should be changed in production so failover works
AUTH_LDAP_SERVER_URI = 'ldaps://ad.ucc.gu.uwa.edu.au' AUTH_LDAP_SERVER_URI = 'ldaps://${AD_DOMAIN}'
# This is also a bad idea, should be changed in production # This is also a bad idea, should be changed in production
AUTH_LDAP_GLOBAL_OPTIONS = { AUTH_LDAP_GLOBAL_OPTIONS = {
...@@ -57,7 +57,7 @@ AUTH_LDAP_GLOBAL_OPTIONS = { ...@@ -57,7 +57,7 @@ AUTH_LDAP_GLOBAL_OPTIONS = {
} }
# LDAP admin settings - NOT for django_auth_ldap # LDAP admin settings - NOT for django_auth_ldap
LDAP_BASE_DN = "DC=ad,DC=ucc,DC=gu,DC=uwa,DC=edu,DC=au" LDAP_BASE_DN = '${AD_BASEDN}'
LDAP_USER_SEARCH_DN = 'CN=Users,' + LDAP_BASE_DN LDAP_USER_SEARCH_DN = 'CN=Users,' + LDAP_BASE_DN
# settings used by memberdb LDAP backend and django_auth_ldap # settings used by memberdb LDAP backend and django_auth_ldap
......
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