Coder Social home page Coder Social logo

rouanw / build-window Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 28.0 458 KB

Information radiator for the health of your CI builds

License: MIT License

Ruby 15.17% CoffeeScript 1.87% JavaScript 76.54% CSS 0.86% HTML 1.93% Dockerfile 0.19% SCSS 3.44%
continuous-integration dashboard dashing

build-window's People

Contributors

dependabot[bot] avatar kohnech avatar rouanw avatar samlancia avatar stefanteixeira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

build-window's Issues

[Docker-compose] Could not locate Gemfile or .bundle/ directory

I cannot run build-windows image because of a Could not locate Gemfile or .bundle/ directory error.
Any idea ?

Running on Docker Desktop on Windows 10 (Version. 10.0.18363 Num. 18363)
Full trace below :


PS C:\Smashing\build-windows> docker-compose build --force-rm
Building build-window
Step 1/8 : FROM ruby:2.6
---> ccd59d23eafc
Step 2/8 : RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
---> Using cache
---> 36499afccebd
Step 3/8 : RUN apt-get update && apt-get -y install nodejs && apt-get -y clean
---> Using cache
---> b8255ac8f92a
Step 4/8 : RUN gem install bundler
---> Using cache
---> 0c5cf4e7913f
Step 5/8 : RUN mkdir /build-window
---> Using cache
---> a9b1d74771d0
Step 6/8 : COPY ./Gemfile /build-window
---> Using cache
---> 1c35559ce0c1
Step 7/8 : RUN cd /build-window && bundle install
---> Using cache
---> d1eb37d05de1
Step 8/8 : WORKDIR /build-window
---> Using cache
---> 62adafe1b79a
Successfully built 62adafe1b79a
Successfully tagged rouanw/build-window:latest
PS C:\Smashing\build-windows> docker-compose build --no-cache
Building build-window
Step 1/8 : FROM ruby:2.6
---> ccd59d23eafc
Step 2/8 : RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
---> Running in 07f980d3fedb
Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [266 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7848 B]
Fetched 8420 kB in 2s (4433 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libapt-inst2.0
The following NEW packages will be installed:
apt-utils libapt-inst2.0
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 625 kB of archives.
After this operation, 1650 kB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security buster/updates/main amd64 libapt-inst2.0 amd64 1.8.2.2 [204 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 apt-utils amd64 1.8.2.2 [421 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 625 kB in 0s (6006 kB/s)
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 23974 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.8.2.2_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.8.2.2) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../apt-utils_1.8.2.2_amd64.deb ...
Unpacking apt-utils (1.8.2.2) ...
Setting up libapt-inst2.0:amd64 (1.8.2.2) ...
Setting up apt-utils (1.8.2.2) ...
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 07f980d3fedb
---> a5f1ccd0e93d
Step 3/8 : RUN apt-get update && apt-get -y install nodejs && apt-get -y clean
---> Running in 41f93521d2af
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libbrotli1 libc-ares2 libnode64 libuv1 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libbrotli1 libc-ares2 libnode64 libuv1 nodejs nodejs-doc
0 upgraded, 6 newly installed, 0 to remove and 5 not upgraded.
Need to get 7145 kB of archives.
After this operation, 31.8 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security buster/updates/main amd64 libbrotli1 amd64 1.0.7-2+deb10u1 [269 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libc-ares2 amd64 1.14.0-1 [85.8 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libuv1 amd64 1.24.1-1 [110 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 libnode64 amd64 10.23.1dfsg-1deb10u1 [5619 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 nodejs-doc all 10.23.1dfsg-1deb10u1 [974 kB]
Get:6 http://security.debian.org/debian-security buster/updates/main amd64 nodejs amd64 10.23.1dfsg-1deb10u1 [87.2 kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 7145 kB in 0s (15.3 MB/s)
Selecting previously unselected package libbrotli1:amd64.
(Reading database ... 24104 files and directories currently installed.)
Preparing to unpack .../0-libbrotli1_1.0.7-2+deb10u1_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.7-2+deb10u1) ...
Selecting previously unselected package libc-ares2:amd64.
Preparing to unpack .../1-libc-ares2_1.14.0-1_amd64.deb ...
Unpacking libc-ares2:amd64 (1.14.0-1) ...
Selecting previously unselected package libuv1:amd64.
Preparing to unpack .../2-libuv1_1.24.1-1_amd64.deb ...
Unpacking libuv1:amd64 (1.24.1-1) ...
Selecting previously unselected package libnode64:amd64.
Preparing to unpack .../3-libnode64_10.23.1dfsg-1deb10u1_amd64.deb ...
Unpacking libnode64:amd64 (10.23.1dfsg-1deb10u1) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../4-nodejs-doc_10.23.1dfsg-1deb10u1_all.deb ...
Unpacking nodejs-doc (10.23.1dfsg-1deb10u1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../5-nodejs_10.23.1dfsg-1deb10u1_amd64.deb ...
Unpacking nodejs (10.23.1dfsg-1deb10u1) ...
Setting up libbrotli1:amd64 (1.0.7-2+deb10u1) ...
Setting up libc-ares2:amd64 (1.14.0-1) ...
Setting up libuv1:amd64 (1.24.1-1) ...
Setting up libnode64:amd64 (10.23.1dfsg-1deb10u1) ...
Setting up nodejs-doc (10.23.1dfsg-1deb10u1) ...
Setting up nodejs (10.23.1dfsg-1deb10u1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 41f93521d2af
---> 6e096be4bcc4
Step 4/8 : RUN gem install bundler
---> Running in c872e0e18412
Successfully installed bundler-2.2.8
1 gem installed
Removing intermediate container c872e0e18412
---> 45b1f2cc558d
Step 5/8 : RUN mkdir /build-window
---> Running in 652f6e1f6220
Removing intermediate container 652f6e1f6220
---> 924baa254b90
Step 6/8 : COPY ./Gemfile /build-window
---> ca950f037e6e
Step 7/8 : RUN cd /build-window && bundle install
---> Running in 1233c3eeafc2
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Fetching public_suffix 4.0.6
Fetching backports 3.20.2
Installing public_suffix 4.0.6
Installing backports 3.20.2
Using bundler 2.2.8
Fetching coffee-script-source 1.12.2
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching concurrent-ruby 1.1.8
Fetching rexml 3.2.4
Installing rexml 3.2.4
Installing concurrent-ruby 1.1.8
Fetching daemons 1.3.1
Fetching diff-lcs 1.4.4
Installing daemons 1.3.1
Fetching dotenv 2.7.6
Installing diff-lcs 1.4.4
Installing dotenv 2.7.6
Fetching eventmachine 1.2.7
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ffi 1.14.2
Installing eventmachine 1.2.7 with native extensions
Installing ffi 1.14.2 with native extensions
Fetching raabro 1.4.0
Fetching hashdiff 1.0.1
Installing raabro 1.4.0
Installing hashdiff 1.0.1
Fetching hashie 4.1.0
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Installing hashie 4.1.0
Fetching ruby2_keywords 0.0.4
Fetching rack 2.2.3
Installing ruby2_keywords 0.0.4
Fetching rspec-support 3.10.2
Installing rack 2.2.3
Installing rspec-support 3.10.2
Fetching tilt 2.0.10
Fetching thor 1.0.1
Installing tilt 2.0.10
Installing thor 1.0.1
Fetching addressable 2.7.0
Fetching coffee-script 2.4.1
Installing addressable 2.7.0
Installing coffee-script 2.4.1
Fetching crack 0.4.5
Fetching tzinfo 2.0.4
Installing crack 0.4.5
Fetching faraday 0.9.2
Installing tzinfo 2.0.4
Fetching sassc 2.4.0
Installing faraday 0.9.2
Fetching mustermann 1.1.1
Installing sassc 2.4.0 with native extensions
Installing mustermann 1.1.1
Fetching rack-protection 2.0.8.1
Installing rack-protection 2.0.8.1
Fetching sprockets 4.0.2
Fetching thin 1.7.2
Installing thin 1.7.2 with native extensions
Installing sprockets 4.0.2
Fetching rspec-core 3.10.1
Fetching rspec-expectations 3.10.1
Installing rspec-expectations 3.10.1
Installing rspec-core 3.10.1
Fetching rspec-mocks 3.10.2
Fetching webmock 3.11.2
Installing rspec-mocks 3.10.2
Fetching et-orbi 1.2.4
Installing et-orbi 1.2.4
Installing webmock 3.11.2
Fetching faraday_middleware 0.9.2
Installing faraday_middleware 0.9.2
Fetching sinatra 2.0.8.1
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching fugit 1.4.2
Installing sinatra 2.0.8.1
Installing fugit 1.4.2
Fetching teamcity-ruby-client 1.3.1
Fetching sinatra-contrib 2.0.8.1
Installing teamcity-ruby-client 1.3.1
Fetching rufus-scheduler 3.6.0
Installing rufus-scheduler 3.6.0
Installing sinatra-contrib 2.0.8.1
Fetching smashing 1.3.1
Installing smashing 1.3.1
Bundle complete! 6 Gemfile dependencies, 45 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.
Removing intermediate container 1233c3eeafc2
---> 92526922c085
Step 8/8 : WORKDIR /build-window
---> Running in 5d262dd8dff7
Removing intermediate container 5d262dd8dff7
---> b6fd31a9ae0d
Successfully built b6fd31a9ae0d
Successfully tagged rouanw/build-window:latest

PS C:\Smashing\build-windows> docker-compose up
Recreating build-windows_build-window_1 ... done Attaching to build-windows_build-window_1
build-window_1 | Could not locate Gemfile or .bundle/ directory
build-windows_build-window_1 exited with code 0

Support more than one BaseURL

It would be nice to support more than one BaseURL e.g. more than one Jenkins instance which is grouped in Dashboard.

Dashing start fails when teamCityBaseUrl is not defined on builds.json

Hi,

I'm trying to use your project on a Docker container, then I noticed that the following section in config.ru

require 'teamcity'
TeamCity.configure do |config|
  config.endpoint = Builds::BUILD_CONFIG['teamCityBaseUrl'] + '/app/rest?guest=1'
end

is causing this error:

config.ru:23:in `block (2 levels) in <main>': undefined method `+' for nil:NilClass (NoMethodError)
    from /usr/local/bundle/gems/teamcity-ruby-client-1.3.1/lib/teamcity/configuration.rb:33:in `configure'
    from config.ru:22:in `block in <main>'
    from /usr/local/bundle/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
    from /usr/local/bundle/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
    from config.ru:1:in `new'
    from config.ru:1:in `<main>'
    from /usr/local/bundle/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `eval'
    from /usr/local/bundle/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `load'
    from /usr/local/bundle/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
    from /usr/local/bundle/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:in `start'
    from /usr/local/bundle/gems/thin-1.6.4/lib/thin/runner.rb:200:in `run_command'
    from /usr/local/bundle/gems/thin-1.6.4/lib/thin/runner.rb:156:in `run!'
    from /usr/local/bundle/gems/thin-1.6.4/bin/thin:6:in `<top (required)>'
    from /usr/local/bundle/bin/thin:16:in `load'
    from /usr/local/bundle/bin/thin:16:in `<main>'

when 'teamCityBaseUrl' is not defined on builds.json (I'm using it with GoCD only).

number of recent builds

Hi,

hope you are well.
Just a short question:
Is it possible to display the number of recent builds here?
build_window.html

I have no experience in ruby but I found in build_health.rb successful_count = builds_with_status.count
Is it possible to get this value in the widget?

Add information

First thanks a lot for this awesome project!

I would like to know how can I add some more information to the boxes - We have jenkins parameters we are injecting to the build, and we would like to display them too.
for example our build number ..

My second question - Is there any way I can dynamically show downstream jobs from our main job in jnekins?

Thanks,
Rotem.

get_jenkins_build_health crashes when Job build history is empty

Hi!

While testing this project on my Jenkins I had found that when any of watched jobs has empty build history (was never build yet, or that history was deleted) then the background job will crash with this stacktrace:

{ 47389702653540 rufus-scheduler intercepted an error:
  47389702653540   job:
  47389702653540     Rufus::Scheduler::EveryJob "20s" {}
  47389702653540   error:
  47389702653540     47389702653540
  47389702653540     NoMethodError
  47389702653540     undefined method `[]' for nil:NilClass
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:126:in `get_jenkins_build_health'
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:10:in `block in api_functions'
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:36:in `get_build_health'
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:137:in `block (2 levels) in <top (required)>'
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:136:in `each'
  47389702653540       /home/smashing/projects/build-window/jobs/build_health.rb:136:in `block in <top (required)>'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:223:in `do_call'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:267:in `trigger_now'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:312:in `block (3 levels) in start_work_thread'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:315:in `block (2 levels) in start_work_thread'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:301:in `loop'
  47389702653540       /home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler/jobs.rb:301:in `block in start_work_thread'
  47389702653540   tz:
  47389702653540     ENV['TZ']:
  47389702653540     Time.now: 2020-09-17 07:35:35 +0000
  47389702653540     local_tzone: #<TZInfo::DataTimezone: Etc/UTC>
  47389702653540   et-orbi:
  47389702653540     (etz:nil,tnz:"UTC",tziv:"2.0.2",tzidv:nil,rv:"2.5.5",rp:"x86_64-linux-gnu",win:false,rorv:nil,astz:nil,eov:"1.2.4",eotnz:#<TZInfo::DataTimezone: Etc/UTC>,eotnfz:"+0000",eotlzn:"Etc/UTC",eotnfZ:"UTC",debian:"Etc/UTC",centos:nil,osx:"Etc/UTC")
  47389702653540   scheduler:
  47389702653540     object_id: 47389697385120
  47389702653540     opts:
  47389702653540       {}
  47389702653540       frequency: 0.3
  47389702653540       scheduler_lock: #<Rufus::Scheduler::NullLock:0x000056338c284270>
  47389702653540       trigger_lock: #<Rufus::Scheduler::NullLock:0x000056338c284248>
  47389702653540     uptime: 240.1780390739441 (4m0.178069353s)
  47389702653540     down?: false
  47389702653540     threads: 2
  47389702653540       thread: #<Thread:0x000056338c273128@/home/smashing/projects/build-window/vendor/bundle/ruby/2.5.0/gems/rufus-scheduler-3.6.0/lib/rufus/scheduler.rb:545 sleep>
  47389702653540       thread_key: rufus_scheduler_47389697385120
  47389702653540       work_threads: 1
  47389702653540         active: 1
  47389702653540         vacant: 0
  47389702653540         max_work_threads: 28
  47389702653540       mutexes: {}
  47389702653540     jobs: 1
  47389702653540       at_jobs: 0
  47389702653540       in_jobs: 0
  47389702653540       every_jobs: 1
  47389702653540       interval_jobs: 0
  47389702653540       cron_jobs: 0
  47389702653540     running_jobs: 1
  47389702653540     work_queue: 0
} 47389702653540 .

The problem is caused by fact that Jenkins returns empty result array in such case:

{"_class":"hudson.model.FreeStyleProject","builds":[]}

Here is place where that crash occurs:

  latest_build = builds_with_status.first
  return {
    name: latest_build['fullDisplayName'],   #line 126
    # ...
  }

So the problem is - what should be returned when there is no build history for job (latest_build is nil).

cannot load such file -- /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/gems/bundler-1.11.2/bin/bundle (LoadError)

The image builds fine with docker compose, but it exits immediately when it tries to run it. In logs I see this:

/usr/local/bin/bundle:22:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/gems/bundler-1.11.2/bin/bundle (LoadError)
    from /usr/local/bin/bundle:22:in `<main>'

I also tried to start the image manually with docker run and run the commands manually with same result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.