dapicester / gitlab-ci-monitor Goto Github PK
View Code? Open in Web Editor NEWSimple monitor for GitLab builds using Arduino with LEDs
Simple monitor for GitLab builds using Arduino with LEDs
Traceback (most recent call last):
18: from ./multi-monitor.rb:19:in `<main>'
17: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:135:in `start'
16: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `start_loop'
15: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `loop'
14: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:28:in `block in start_loop'
13: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:136:in `block in start'
12: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:136:in `each'
11: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:137:in `block (2 levels) in start'
10: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:146:in `check_latest'
9: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:39:in `latest_build'
8: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:68:in `fetch'
7: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:609:in `start'
6: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
5: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
4: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:935:in `connect'
3: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
2: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect': Failed to open TCP connection to gitlab.com:443 (Operation timed out - connect(2) for "gitlab.com" port 443) (Errno::ETIMEDOUT)
Mini:gitlab-ci-monitor admin$ ./multi-monitor.rb
Add also some tests.
This is happening more often:
I, [2017-02-08T13:23:10.541907 #54177] INFO -- : Fetching pipelines ...
/Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to gitlab.com:443 (getaddrinfo: nodename nor servname provided, or not known) (SocketError)
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty/request.rb:118:in `perform'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty.rb:560:in `perform_request'
from /Users/paolo/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/httparty-0.14.0/lib/httparty.rb:486:in `get'
from ./monitor.rb:36:in `latest_build'
from ./monitor.rb:130:in `check_latest'
from ./monitor.rb:124:in `block in start'
from ./monitor.rb:123:in `loop'
from ./monitor.rb:123:in `start'
from ./monitor.rb:185:in `<main>'
/Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:113: warning: constant ::Fixnum is deprecated
Sometimes is easier to have a page open in the browser.
Can use Sinatra with autorefresh (easy) or some kind of refresh on change (websockets?).
Basically, just get rid of the single-project script and always use the multi-project.
It would be nice to keep logs saved to files, possibly with daily logrotation.
/Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:176:in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout) from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:154:in
readuntil'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/protocol.rb:164:in readline' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http/response.rb:40:in
read_status_line'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http/response.rb:29:in read_new' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1446:in
block in transport_request'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1443:in catch' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1443:in
transport_request'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:1416:in request' from ./monitor.rb:61:in
block in latest_build'
from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:877:in start' from /Users/Yiling/.rbenv/versions/2.4.0/lib/ruby/2.4.0/net/http.rb:608:in
start'
from ./monitor.rb:57:in latest_build' from ./monitor.rb:179:in
check_latest'
from ./monitor.rb:173:in block in start' from ./monitor.rb:172:in
loop'
from ./monitor.rb:172:in start' from ./monitor.rb:234:in
It would be nice if:
I added many nocov
blocks, some of those could be actually tested.
This could be an interesting thing to implement in Ruby.
See here
I, [2018-08-21T17:35:06.120835 #59084] INFO -- : 1878081: Fetching pipelines ...
Traceback (most recent call last):
14: from ./monitor.rb:17:in `<main>'
13: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:51:in `start'
12: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `start_loop'
11: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:27:in `loop'
10: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:28:in `block in start_loop'
9: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:52:in `block in start'
8: from /Users/admin/gitlab-ci-monitor/lib/build_monitor.rb:58:in `check_latest'
7: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:36:in `latest_build'
6: from /Users/admin/gitlab-ci-monitor/lib/build_fetcher.rb:49:in `fetch'
5: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:609:in `start'
4: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:909:in `start'
3: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
2: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/http.rb:981:in `connect'
1: from /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read serve$ hello A (OpenSSL::SSL::SSLError)
Mini:gitlab-ci-monitor admin$ ./monitor.rb
There should be one buzz on the first build failure. Next failures should not buzz.
Example:
Today got a power shortage and the software hanged.
Should add some kind of periodic check on the arduino presence, or a disconnect handler.
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.