lmars / flynn-webhook-deploy Goto Github PK
View Code? Open in Web Editor NEWFlynn GitHub Webhook Deploy
License: MIT License
Flynn GitHub Webhook Deploy
License: MIT License
New flynn cluster, getting this error:
[2016-08-11T20:56:25.593651708Z] 20:56:25.593519 postgres.go:54: Get http://192.168.200.11:1111,192.168.200.12:1111,192.168.200.13:1111/services/postgres: dial tcp: too many colons in address 192.168.200.11:1111,192.168.200.12:1111,192.168.200.13:1111
Redeploying the latest version of webhooks--
Seemed to fail to deploy:
git push flynn master
Counting objects: 362, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (194/194), done.
Writing objects: 100% (362/362), 541.10 KiB | 0 bytes/s, done.
Total 362 (delta 161), reused 313 (delta 112)
-----> Building webhook-deploy...
-----> Go app detected
-----> Checking Godeps/Godeps.json file.
-----> Using go1.4
-----> Running: godep go install -tags heroku ./...
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 3.1M
-----> Creating release...
remote: Error deploying app release: timed out waiting for deployment completion
To https://git.mxwy.flynnhub.com/webhook-deploy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.mxwy.flynnhub.com/webhook-deploy.git'
But it was deployed:
2016-01-20T20:40:19.790265Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: 2016/01/20 20:40:19 listening for GitHub webhooks on port 8080...
Running it, I get on the main page a red error box that says:
GET /repos.json Error!
but trying to add a web hook brings up a dialog-- and the apps are included in the popup (fixing the previous problem)
But when you submit the dialog you get redirected to the endpoint:
http://webhook-deploy.mxwy.flynnhub.com/repos
which gives
"Service Unavailable"
Looking at the logs I found:
2016/01/20 21:39:09 http: panic serving 100.100.24.1:48915: runtime error: invalid memory address or nil pointer dereference
2016-01-20T21:39:09.017817Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: goroutine 1777 [running]:
2016-01-20T21:39:09.018067Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: net/http.func·011()
2016-01-20T21:39:09.018232Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /usr/local/go/src/net/http/server.go:1130 +0xbb
2016-01-20T21:39:09.018292Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).conn(0x0, 0x0, 0x0, 0x0)
2016-01-20T21:39:09.018467Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:662 +0x811
2016-01-20T21:39:09.018629Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).query(0x0, 0x8657d0, 0x4e, 0xc20809db18, 0x3, 0x3, 0x7fa085d840d0, 0x0, 0x0)
2016-01-20T21:39:09.018690Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:967 +0x43
2016-01-20T21:39:09.018958Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).Query(0x0, 0x8657d0, 0x4e, 0xc20809db18, 0x3, 0x3, 0x41005c, 0x0, 0x0)
2016-01-20T21:39:09.019152Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:958 +0xa6
2016-01-20T21:39:09.019182Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).QueryRow(0x0, 0x8657d0, 0x4e, 0xc20809db18, 0x3, 0x3, 0x48201f)
2016-01-20T21:39:09.019434Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:1036 +0x66
2016-01-20T21:39:09.019575Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: main.createRepo(0x7fa085d94b00, 0xc20803c960, 0xc208033380, 0x0, 0x0, 0x0)
2016-01-20T21:39:09.019776Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/webhook.go:143 +0x340
2016-01-20T21:39:09.020134Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc20803bdd0, 0x7fa085d94b00, 0xc20803c960, 0xc208033380)
2016-01-20T21:39:09.020341Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/julienschmidt/httprouter/router.go:299 +0x18e
2016-01-20T21:39:09.020489Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: net/http.serverHandler.ServeHTTP(0xc20805ade0, 0x7fa085d94b00, 0xc20803c960, 0xc208033380)
2016-01-20T21:39:09.020518Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /usr/local/go/src/net/http/server.go:1703 +0x19a
2016-01-20T21:39:09.020656Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: net/http.(*conn).serve(0xc20803cbe0)
2016-01-20T21:39:09.020766Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /usr/local/go/src/net/http/server.go:1204 +0xb57
2016-01-20T21:39:09.020911Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: created by net/http.(*Server).Serve
2016-01-20T21:39:09.020968Z app[web.flynn1453239883vm1-cc6e30a3-9b7b-40fc-b94f-55435ae6e0ba]: /usr/local/go/src/net/http/server.go:1751 +0x35e
However it seems the service is running, and successfully responded to a ping:
2016-01-20T21:52:56.032706Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: 2016/01/20 21:52:56 handling request
2016-01-20T21:52:56.033482Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: 2016/01/20 21:52:56 received ping event
(I have scale set to 3 so requests are going to different web hooks)
A typical use case would involve deploying from a single branch to single app, so adding a branch filter to the repo specification makes sense:
lmars/go-flynn-example#production=go-app
With the default branch master
.
I have a feeling my private repository isn't deploying due to lack of access to the repo from the flynn host, is there a way to include a deploy key in the app config?
log for the flynn webhook-deploy app
Cloning into '/tmp/app'...
fatal: could not read Username for 'https://github.com': No such device or address
exit status 128
unexpected exit status: 1
2016-01-20T21:59:36.149485Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: 2016/01/20 21:59:36 handling request
2016-01-20T21:59:36.149888Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: 2016/01/20 21:59:36 received push event
2016-01-20T21:59:36.150961Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: 2016/01/20 21:59:36 http: panic serving 100.100.69.1:48401: runtime error: invalid memory address or nil pointer dereference
2016-01-20T21:59:36.151016Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: goroutine 3113 [running]:
2016-01-20T21:59:36.151168Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: net/http.func·011()
2016-01-20T21:59:36.151329Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /usr/local/go/src/net/http/server.go:1130 +0xbb
2016-01-20T21:59:36.151358Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).conn(0x0, 0x1, 0x0, 0x0)
2016-01-20T21:59:36.151490Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:662 +0x811
2016-01-20T21:59:36.151647Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).query(0x0, 0x867830, 0x53, 0xc2080d3920, 0x2, 0x2, 0x7f0d4a1b70a8, 0x0, 0x0)
2016-01-20T21:59:36.151738Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:967 +0x43
2016-01-20T21:59:36.151903Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).Query(0x0, 0x867830, 0x53, 0xc2080d3920, 0x2, 0x2, 0x41005c, 0x0, 0x0)
2016-01-20T21:59:36.152050Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:958 +0xa6
2016-01-20T21:59:36.152230Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql.(*DB).QueryRow(0x0, 0x867830, 0x53, 0xc2080d3920, 0x2, 0x2, 0x458160)
2016-01-20T21:59:36.152425Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/flynn/go-sql/sql.go:1036 +0x66
2016-01-20T21:59:36.152592Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: main.getRepo(0xc2080e2e40, 0x1a, 0xc2080e288b, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
2016-01-20T21:59:36.152753Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/webhook.go:164 +0x1bf
2016-01-20T21:59:36.152808Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: main.webhook(0x7f0d4a1c6cf0, 0xc20803caa0, 0xc20803e820, 0x0, 0x0, 0x0)
2016-01-20T21:59:36.152938Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/webhook.go:223 +0xb8c
2016-01-20T21:59:36.153125Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc20803bdd0, 0x7f0d4a1c6cf0, 0xc20803caa0, 0xc20803e820)
2016-01-20T21:59:36.153150Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /tmp/build/.heroku/go/src/github.com/lmars/flynn-webhook-deploy/Godeps/_workspace/src/github.com/julienschmidt/httprouter/router.go:299 +0x18e
2016-01-20T21:59:36.153366Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: net/http.serverHandler.ServeHTTP(0xc20805ade0, 0x7f0d4a1c6cf0, 0xc20803caa0, 0xc20803e820)
2016-01-20T21:59:36.153527Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /usr/local/go/src/net/http/server.go:1703 +0x19a
2016-01-20T21:59:36.153610Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: net/http.(*conn).serve(0xc20803ca00)
2016-01-20T21:59:36.153808Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /usr/local/go/src/net/http/server.go:1204 +0xb57
2016-01-20T21:59:36.153975Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: created by net/http.(*Server).Serve
2016-01-20T21:59:36.154003Z app[web.flynn1453239883vm2-6cec5200-039f-49c1-adcd-97a6ef11bded]: /usr/local/go/src/net/http/server.go:1751 +0x35e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.