Comments (13)
Seems like a good idea. I guess the use case is: With systems that SSH into servers to do deployments (Capistrano, Fabric etc), it's convenient to be able to run a command from the commandline that utilizes the same Opbeat credentials that are already set up on the server. Our Capistrano integration does this for Ruby projects: https://github.com/opbeat/opbeat_ruby/blob/master/lib/opbeat/capistrano/capistrano2.rb
What do you think @watson ?
from opbeat-node.
With node, there are still a lot of flavours of deployment tools (unlike the ruby standardization on capistrano). That's why I suggest that this library just expose the method rather than try to integrate with the deploy tools directly. We actually use capistrano to deploy node at TaskRabbit, but that's another topic..
It's important to note that the working directory may not be the root of the git repo, so I think that passing path
is important (where to inspect the current git revision, etc)
The way we handled this with airbrake is that we wrapped airbrake.client.trackDeployment()
in a grunt script we had capistrano call after deploy
, ie:
grunt.registerTask('notifyAirbrakeDeploy','tell airbrake we deployed',function(message){
var done = this.async()
init(function(api){
api.airbrake.configure();
api.airbrake.client.trackDeployment(function(){
done();
})
})
})
from opbeat-node.
@evantahler I've been working on your suggested implementation. Do you expect it to figure out the git rev, branch etc. by it self, or should that be parsed to the trackDeployment()
function in the arguments?
If the trackDeployment()
method should figure this out by it self it would only work if you deploy using git push
because it would need access to the repository
from opbeat-node.
Hey Thomas. The idea is that the repo is available locally. The method could then take a local path and pull the info from it. It could also optionally take overrides for rev & branch directly.
from opbeat-node.
+1 to just passing a path
(which would default to process.cwd()
I imagine). For completeness, I imagine the options and their defaults look something like:
options = {
path: process.cwd(),
scm: 'git',
release: (git sha),
branch: (git branch),
time: new Date().getTime() / 1000
}
In the future, other SCMs might be added (svn, hg, etc). Perhaps via plugin. I think @opbeat generally assumes only git deployments currently (as their service requires a link to github.com), so its probably moot for now.
from opbeat-node.
Do you need the timestamp? As far as I know Opbeat doesn't support a timestamp when tracking a deployment... correct me if I'm wrong @roncohen ?
from opbeat-node.
We actually used to support a plethora of SCMs but everyone we talked to used Git so we ditched the others ;)
For now, we don't support time
. I suggest we go ahead without it for now.
from opbeat-node.
@evantahler check out the updated README of the linked pull request and check if this supports your use-case
from opbeat-node.
looks great!
from opbeat-node.
It's in master now. Please try it out and if everything works as expected I'll release a new version
from opbeat-node.
It doesn't work for me.
I always get the following error from opbeat's servers:
opbeat: could not notify service.
opbeat: Error: Opbeat error (411): <html>
<head><title>411 Length Required</title></head>
<body bgcolor="white">
<center><h1>411 Length Required</h1></center>
<hr><center>nginx/1.1.19</center>
</body>
</html>
Digging in, we never actually send any deployment information (sha, branch etc). I've commented on the relevant line numbers on commit a4baafe with my thoughts
from opbeat-node.
@evantahler Sorry about the delayed response. I didn't notice your comment because the issue was closed. I've made a fix to master and reopened the issue
from opbeat-node.
Version v1.0 have been released. Check the upgrade guide. I'm considering this one closed. Please open another issue if you need extra functionality :)
from opbeat-node.
Related Issues (20)
- An in-range update of pg is breaking the build 🚨
- An in-range update of express-graphql is breaking the build 🚨 HOT 1
- An in-range update of graphql is breaking the build 🚨
- An in-range update of generic-pool is breaking the build 🚨
- An in-range update of ws is breaking the build 🚨 HOT 1
- An in-range update of nock is breaking the build 🚨 HOT 2
- async/await HOT 1
- An in-range update of fast-safe-stringify is breaking the build 🚨 HOT 3
- An in-range update of ws is breaking the build 🚨 HOT 4
- An in-range update of pg is breaking the build 🚨 HOT 3
- An in-range update of nock is breaking the build 🚨 HOT 5
- An in-range update of koa is breaking the build 🚨 HOT 3
- An in-range update of uuid is breaking the build 🚨
- An in-range update of semver is breaking the build 🚨 HOT 1
- An in-range update of nock is breaking the build 🚨 HOT 11
- An in-range update of require-in-the-middle is breaking the build 🚨 HOT 2
- Exception when calling captureError with Express HOT 1
- How is the progress of support Restify? HOT 1
- Version 10 of node.js has been released
- An in-range update of tape is breaking the build 🚨 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opbeat-node.