Skip to content

Commit

Permalink
added opbeat config and fabfile
Browse files Browse the repository at this point in the history
  • Loading branch information
algosuna committed Dec 5, 2015
1 parent e6fc673 commit 43aa52d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions djangomx/djangomx/settings/common.py
Expand Up @@ -52,6 +52,7 @@


MIDDLEWARE_CLASSES = (
'opbeat.contrib.django.middleware.OpbeatAPMMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
Expand Down Expand Up @@ -116,6 +117,7 @@
'sorl.thumbnail',
'django_markdown',
'django_nose',
'opbeat.contrib.django',

'blog',
'contact',
Expand Down Expand Up @@ -195,3 +197,10 @@
'--cover-package=accounts,blog,jobs',
'-s',
]

# opbeat settings
OPBEAT = {
'ORGANIZATION_ID': '9652e6f850dd4856857cc34028a163a6',
'APP_ID': '9f9c5def57',
'SECRET_TOKEN': '4c8c3b73ae8bf4c66945cceac29163752cabe53f',
}
14 changes: 14 additions & 0 deletions fabfile.py
@@ -0,0 +1,14 @@
from fabric.api import runs_once, lcd, local, task


@task
@runs_once
def register_deployment(git_path):
with(lcd(git_path)):
revision = local('git log -n 1 --pretty="format:%H"', capture=True)
branch = local('git rev-parse --abbrev-ref HEAD', capture=True)
local('curl https://intake.opbeat.com/api/v1/organizations/9652e6f850dd4856857cc34028a163a6/apps/9f9c5def57/releases/'
' -H "Authorization: Bearer 4c8c3b73ae8bf4c66945cceac29163752cabe53f"'
' -d rev="{}"'
' -d branch="{}"'
' -d status=completed'.format(revision, branch))
1 change: 1 addition & 0 deletions requirements/base.txt
Expand Up @@ -13,6 +13,7 @@ django-tinymce==1.5.3
mailchimp==2.0.9
model-mommy==1.2.5
nose==1.3.7
opbeat==3.1.3
Pillow==2.8.1
psycopg2==2.6
pytz==2015.2
Expand Down

0 comments on commit 43aa52d

Please sign in to comment.