djangoldp-notification/.gitlab-ci.yml

75 lines
2.1 KiB
YAML
Raw Normal View History

2019-01-10 17:00:42 +00:00
---
image: python:3.6
stages:
- test
- release
variables:
SIB_PROJECT_NAME: "sib_test"
SIB_PROJECT_DIR: "/builds/$SIB_PROJECT_NAME"
DJANGO_SETTINGS_MODULE: "$SIB_PROJECT_NAME.settings"
SIB_PACKAGE_CONTENT: >
{
"ldppackages": {
"djangoldp_project": "djangoldp_project",
"djangoldp_circle": "djangoldp_circle",
"djangoldp_notification": "djangoldp_notification",
"djangoldp_account": "djangoldp_account",
"djangoldp_skill": "djangoldp_skill",
"djangoldp_joboffer": "djangoldp_joboffer",
"djangoldp_conversation": "djangoldp_conversation",
"djangoldp_profile": "djangoldp_profile",
"oidc_provider": "git+https://github.com/jblemee/django-oidc-provider.git@develop"
},
"server": {
"site_url": "http://localhost:8000",
"allowed_hosts": [
],
"db_host": "localhost",
"db_name": "database",
"db_user": "me",
"db_pass": "changeit",
"smtp_host": "locahost",
"smtp_user": "user",
"smtp_pass": "changeit",
"admin_email": "admin@example.org",
"admin_name": "admin",
"admin_pass": "admin"
}
}
2019-01-10 17:00:42 +00:00
test:
stage: test
before_script:
- export PATH="$PATH:/root/.local/bin" PYTHONPATH="$SIB_PROJECT_DIR"
- pip install git+https://git.happy-dev.fr/startinblox/devops/sib.git
- cd /builds && DJANGO_SETTINGS_MODULE="" sib startproject $SIB_PROJECT_NAME
- echo $SIB_PACKAGE_CONTENT > $SIB_PROJECT_DIR/packages.yml
- cd $SIB_PROJECT_DIR
- sib install $SIB_PROJECT_NAME
- cd $CI_PROJECT_DIR
- pip install -e .[dev]
2019-01-10 17:00:42 +00:00
script:
- pytest
2019-01-10 17:00:42 +00:00
except:
- master
tags:
- sib
publish:
stage: release
before_script:
- git config user.name "${GITLAB_USER_NAME}"
- git config user.email "${GITLAB_USER_EMAIL}"
- git remote set-url origin "https://gitlab-ci-token:${GL_TOKEN}@git.happy-dev.fr/${CI_PROJECT_PATH}.git"
- pip install git+https://github.com/plup/python-semantic-release
- pip install sib-commit-parser
script:
- semantic-release publish
only:
- master
tags:
- sib