Package Data | |
---|---|
Maintainer Username: | weotch |
Maintainer Contact: | info@bkwld.com (Robert Reinhard) |
Package Create Date: | 2012-09-26 |
Package Last Update: | 2017-09-13 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:23:42 |
Package Statistics | |
---|---|
Total Downloads: | 10,419 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 10 |
Total Forks: | 3 |
Total Open Issues: | 1 |
This is a Laravel Package that makes it easy to integrate with select Codebase features:
"bkwld/codebasehq": "~4.0"
) and do a composer install.Bkwld\CodebaseHQ\ServiceProvider::class,
.You will need to supply credentials to your CodebaseHQ account for this package to work. You can either store the following in your .env
file (preferred) or publish and edit the config file for this package (php artisan vendor:publish --provider=="Bkwld\CodebaseHQ\ServiceProvider"
).
project
configs is requiredapi
creds are needed# CodebaseHQ settings
CODEBASE_PROJECT_SLUG=
CODEBASE_PROJECT_KEY=
CODEBASE_API_USERNAME=
CODEBASE_API_KEY=
CODEBASE_LOG_EXCEPTIONS=
This package listens for Laravel log events and pushes errors to CodebaseHQ. By default, exceptions fired from a local
environment are not sent to CodebaseHQ. This can be changed by setting CODEBASE_LOG_EXCEPTIONS
explicitly to true
in your local .env
file. You can control which exceptions don't get sent to CodebaseHQ by editing your app's App\Exceptions\Handler::$dontReport
variable.
DeployHQ has a "Deployments" tab, found within your repo, that lists deployments. You can add to this list using the codebasehq:deploy
command. It accepts the following options, which mimic those found in the API docs.
servers
required - List of servers which you are deploying to (multiple servers should be comma separated, e.g. app1.myapp.com, app2.myapp.com, app3.myapp.com).branch
- The branch which you are deploying. This defaults to the currently checked out branch.revision
- The reference of the revision/commit you are deploying. It defaults to the HEAD commit.deploy-env
- The environment you are pushing to.Examples:
php artisan codebasehq:deploy app1.myapp.com
php artisan codebasehq:deploy production --branch=production
This command is designed to be run as part of a deploy script and requires you using the CodebaseHQ feature of linking to tickets from commit messages (ex: [touch:12]). By piping the output from git log
for the commits you are deploying to php artisan codebasehq:deploy-tickets
, the package will scan the logs for ticket references and then update those tickets that they have been deployed. Here's some examples:
# Get all the commits that aren't on staging/master but are local
git log staging/master..master | php artisan codebasehq:deploy-tickets
# The same as before, but fetch first so the diff is up to date
git fetch staging && git log staging/master..master | php artisan codebasehq:deploy-tickets
# Specify which server environment you are deploying to
git fetch staging && git log staging/master..master | php artisan codebasehq:deploy-tickets --server=staging
# Save the the log before you deploy, then tell CodebaseHQ about it after
git fetch staging && git log staging/master..master > /tmp/deployed-staging-commits.log
run-deploy-code
cat /tmp/deployed-staging-commits.log | php artisan codebasehq:deploy-tickets --server=staging
rm /tmp/deployed-staging-commits.log
Here is an example of what will get appended to the ticket: