Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes honeybadger deployment notification #1444

Merged
merged 1 commit into from
Sep 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .ebextensions/honeybadger.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ files:
content: |
#!/usr/bin/env bash

EB_CONFIG_SOURCE_BUNDLE=$(/opt/elasticbeanstalk/bin/get-config container -k source_bundle)
EB_SUPPORT_FILES=$(/opt/elasticbeanstalk/bin/get-config container -k support_files_dir)
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)

DEPLOY_ENVS=$($EB_SUPPORT_FILES/generate_env | grep "APP_ENV\|HONEYBADGER_API_KEY")
. $EB_SUPPORT_DIR/envvars

/usr/bin/env $DEPLOY_ENVS APP_VERSION=$(unzip -z "${EB_CONFIG_SOURCE_BUNDLE}" | tail -n 1) bash -c 'curl -sd "deploy[repository][email protected]:projecthydra-labs/hyku.git&deploy[revision]=${APP_VERSION}&deploy[local_username]=root&deploy[environment]=${APP_ENV}&api_key=${HONEYBADGER_API_KEY}" https://api.honeybadger.io/v1/deploys' > /tmp/deploy_01_notify.log
APP_VERSION=$(cat /opt/elasticbeanstalk/deploy/manifest | egrep -o "[0-9a-f]{40} | uniq")
curl -sd "deploy[repository][email protected]:${GITHUB_REPO}&deploy[revision]=${APP_VERSION}&deploy[local_username]=root&deploy[environment]=${HONEYBADGER_ENV}&api_key=${HONEYBADGER_API_KEY}" https://api.honeybadger.io/v1/deploys > /tmp/deploy_01_notify.log