Giter Site home page Giter Site logo

marcells / node-build-monitor Goto Github PK

View Code? Open in Web Editor NEW
349.0 18.0 169.0 4.13 MB

A Build Monitor written in Node.js, which supports several build services and can be easily extended.

Home Page: https://marcells.github.io/node-build-monitor

License: MIT License

JavaScript 73.24% CSS 9.02% HTML 15.41% Dockerfile 0.31% Pug 1.60% Mustache 0.42%
build build-tool monitor tfs travis-ci jenkins teamcity gitlab buddybuild bamboo

node-build-monitor's Introduction

Build and Release Build Status Code Climate Known Vulnerabilities

node-build-monitor

A Build Monitor written in Node.js, which supports several build services. It can be easily extended to support new services. You can mix different services as you like and you'll always see the newest builds in its responsive and themable web frontend automatically. And finally, everything is prepared to run as a Docker container.

Here's a demo: http://builds.mspi.es (other themes)
(automatically deployed from this repository with Docker Cloud as a Docker container to the Microsoft Azure Cloud)

Screenshot

Supported services

Feel free to make a Fork of this repository and add another service.

Jump to the configuration documentation and see how the services are configured.

Quickstart

You have four options:

Configuration

The build monitor configuration can be placed in one of the following locations:

  1. %HomeDirectory%/node-build-monitor-config.json
  2. %PathOfExecutable%/config.json (only for the standalone version)
  3. app/config.json
{
  "monitor": {
    "interval": 30000,
    "numberOfBuilds": 12,
    "latestBuildOnly": false,
    "sortOrder": "date",
    "errorsFirst": false,
    "expandEnvironmentVariables": false,
    "debug": true
  },
  "services": [
    {
      "name": "Travis",
      "configuration": {
        "slug": "node-build-monitor"
      }
    },
    {
      "name": "Travis",
      "configuration": {
        "slug": "marcells/bloggy",
        "latestBuildOnly": true
      }
    }
  ]
}

In the monitor section you can set up some general settings:

Setting Description
interval The update interval (in milliseconds)
numberOfBuilds The number of builds, which will be read and displayed in the web frontend (ignored if latestBuildOnly is enabled)
latestBuildOnly Will only retrieve single latest build from each service configuration. This setting can be overwritten in each service configuration.
sortOrder The sort order for buils, options : project, date
errorsFirst Errors should be before success elements, apply sortOrder after that
expandEnvironmentVariables Tries to expand root service configuration properties from environment variables (e.g.: "${MY_PASSWORD}" will look for an environment variable MY_PASSWORD and will use that)
debug Enable or disable some debug output on the console. Useful, if you're hunting an issue in a plugin or its configuration.

The services section accepts an array, each describing a single build service configuration (you are allowed to mix different services):

  • the name setting refers to the used service
  • the configuration setting refers to its configuration, which may differ from each service (see below)

Travis CI

Supports the Travis CI build service.

{
  "name": "Travis",
  "configuration": {
    "slug": "marcells/node-build-monitor"
  }
}
Setting Description
slug The name of the build (usually your GitHub user name and the project name)
url The Travis CI server (travis-ci.org, travis-ci.com, travis.enterprise_name.com). Defaults to travis-ci.org.
token The Travis access token, to access your private builds (can be found on your Accounts page. If this does not work then you must use the access token you get by executing shell commands. More information can be found at https://blog.travis-ci.com/2013-01-28-token-token-token).
is_enterprise Set this value to true if you plan to use Travis CI enterprise. Default to false.

Jenkins

Supports the Jenkins build service. The service can operate in single-job or single-view mode. In single-job mode, the builds of a selected Jenkins job are shown. In single-view mode, the builds of all the jobs in a given Jenkins view are shown. In both modes, one can limit the maximum number of recent builds per job.

{
  "name": "Jenkins",
  "configuration": {
    "url": "http://jenkins-server:8080",
    "username": "jenkins_username",
    "password": "jenkins_password",
    "job": "JenkinsJobName",
    "numberOfBuildsPerJob": 3,
    "options": {
      "strictSSL": false
    }
  }
}
Setting Description
url The url to the Jenkins server
username Your Jenkins user name
password Your Jenkins password
job The name of the Jenkins job whose builds are to be shown in single-job mode. Takes precedence over view if both are given.
view The name of the Jenkins view whose jobs and builds are to be shown in single-view mode. Optional.
options The request options.
Refer to request module options for possible values
numberOfBuildsPerJob Limit the number of builds fetched for each job. Optional, defaults to no limitation.

TeamCity

Supports the TeamCity build service.

{
  "name": "TeamCity",
  "configuration": {
    "url": "http://teamcity_username:teamcity_password@teamcity-server:8111",
    "buildConfigurationId": "TeamCityProject_TeamCityBuildConfiguration",
    "branch": "master",
    "authentication": "ntlm",
    "username": "teamcity_username",
    "password": "teamcity_password",
    "useGuest": true,
    "reportFailedToStart": true
  }
}
Setting Description
url The url to the TeamCity server (including the credentials without a trailing backslash, if not the guest user is used).
buildConfigurationId The id of the TeamCity build configuration
branch The name of branch that needs to be monitored. Will monitor all branches if not specified.
authentication This option is only required if using 'ntlm' other option have no meaning
username Your TeamCity user name (if required)
password Your TeamCity password (if required)
useGuest Uses the guest user (if required)
reportFailedToStart Causes "Failed to Start" builds to be reported as build failures.

Azure DevOps and Team Foundation Server Builds

Supports Azure Pipelines, the Azure DevOps and Team Foundation Server build service.

{
  "name": "Tfs",
  "configuration": {
    "url": "https://{youraccount}.visualstudio.com or http://tfs-server:8080/tfs",
    "collection": "DefaultCollection",
    "project": "projectname",
    "username": "username",
    "pat": "personalaccesstoken",
    "queryparams": "&branchName=refs/heads/master&definitions=4,5,6,7&maxBuildsPerDefinition=1",
    "includeQueued": false,
    "showBuildStep": false
  }
}
Setting Description
url Url to your Azure DevOps account (https://dev.azure.com/youraccount/) or TFS server (http://tfs-server:8080/tfs)
collection Collection name. Defaults to DefaultCollection.
project Team project ID or name
username Username used to login (if it's a domain user, ensure to escape the backslash in the configuration: "domain\\username")
pat Personal Access Token with access to builds (TFS 2015 users should be able to use the password for the given user)
queryparams Any query params that REST API accepts, more info: https://docs.microsoft.com/en-us/rest/api/vsts/build/
includeQueued Set to true, if queued builds should be shown on the monitor. Defaults to false.
showBuildStep Set to true, to add the current step/stage to the text show for the status. Defaults to false.

Note:

  • Create a peronal access token with access to read builds.
  • The url formed is of the following format: https://{instance}/{collection}/{project}/_apis/build/builds?api-version=2.0[queryparams]
  • Please note that all the configuration fields are mandatory. If a field is not required like queryparams, please provide empty string in the configuration.

Azure DevOps and Team Foundation Server Releases

Supports Azure Piplines, the Azure DevOps and Team Foundation Server (Releases) release service.

{
  "name": "TfsRelease",
  "configuration": {
    "protocol": "protocol",
    "project": "projectname",
    "instance": "instance",
    "username": "username",
    "pat": "personalaccesstoken",
    "queryparams" : "&$top=10",
    "groupbyrelease": false,
    "apiVersion": "4.1-preview"
  }
}
Setting Description
protocol Use HTTP or HTTPS will default to HTTPS if it is not set
project Team project ID or name
instance Azure DevOps account without https:// (dev.azure.com/youraccount/yourcollection) or TFS server (tfs-server:8080/tfs/yourcollection) including collection.
username Username used to login
pat Personal Access Token with access to releases
queryparams Any query params that REST API accepts, more info: VSTS Rest Uri parameters
groupbyrelease Group builds by same release id. Defaults to false.
apiVersion The API version to target. Defaults to 4.1-preview. Allowed values are: 3.2-preview 4.1-preview

Note: Create a personal access token with access to read builds.

  • The url formed is of the following format: https://{instance}/{project}/_apis/release/deployments?api-version={apiVersion}[queryparams]
  • Please note that all the configuration fields are mandatory. If a field is not required like queryparams, please provide empty string in the configuration.

Team Foundation Server 2013 and lower (on-premise)

Supports an on-premise Microsoft Team Foundation Server via the tfs-proxy bridge.

{
  "name": "TfsProxy",
  "configuration": {
    "tfsProxyUrl": "http://tfs-proxy:4567/builds",
    "url": "http://tfs-server:8080/tfs/DefaultCollection",
    "username": "domain\\buildadmin",
    "password": "buildadmin_password"
  }
}
Setting Description
tfsProxyUrl The url to the tfs-proxy. If you use Docker to run node-build-monitor and tfs-proxy, this setting can be omitted (see details below in the Docker section).
url The full Team Collection Url, which builds are displayed (selecting single team projects or build definitions is not supported currently)
authentication This option is only required if using 'ntlm' other option have no meaning
username User with permission to query build details
password The password for the user

Team Foundation Server 2015/2017 (on-premise)

Supports an on-premise Microsoft Team Foundation Server 2015/2017 (and later).

{
  "name": "Tfs2015",
  "configuration": {
    "url": "http://tfs-server:8080/tfs/DefaultCollection/TeamProject",
    "username": "domain\\buildadmin",
    "password": "buildadmin_password"
  }
}
Setting Description
url The full Team Collection Url, including the TeamProject, which builds are displayed
authentication This option is only required if using 'ntlm' other option have no meaning
username User with permission to query build details
password The password for the user (if using TFS 2017 see notes below)

Important: For TFS 2017 you have to create a personal access token. It only needs the permission to read builds. Please use your username and the generated token as the password.

GitLab (on-premise, beta)

Supports an on-premise GitLab Community Edition/Enterprise Edition with built-in CI server. Also supports hosted gitlab.

{
  "name": "GitLab",
  "configuration": {
    "url": "http://gitlab.example.com:8080",
    "token": "secret_user_token",
    "additional_query": "&search=gitlab-org&starred=true",
    "numberOfPipelinesPerProject": 3,
    "pipeline": {
      "status": ["running", "pending", "success", "failed", "canceled", "skipped"]
    },
    "slugs": [
      {
        "project": "gitlab-org/gitlab-ci-multi-runner",
        "ref": "master"
      }
    ]
  }
}
Setting Description
url GitLab server http(s) address string
token Secret token string for the existing user to be used to authenticate against GitLab REST API
slugs List of project slugs to display and check for builds. Defaults to */* for all projects you have access to. Use /* when specifying group slug to include projects only from current group and /** to also include subgroups. Optional 'ref' attribute can be used to specify the branch.
intervals How often (in integer of milliseconds) ...
additional_query Add additional query parameters so not too many projects are fetched.
numberOfPipelinesPerProject Limit the number of pipelines fetched for each project. Optional, defaults to no limitation.

Because API V4 returns all internal and public projects by default, you propably want to set additional_query as well. Good choices could be &owned=true or &membership=true. If you want to filter the pipeline status you'll need to set pipeline.status otherwise it will show every status.

BuddyBuild

Supports BuddyBuild build service

{
  "name": "BuddyBuild",
  "configuration": {
    "project_name": "Android",
    "app_id": "Your-App-ID",
    "url": "https://api.buddybuild.com/v1/apps",
    "access_token": "Your-Access-Token",
    "build_id": "",
    "branch": "develop"
  }
}
Setting Description
project_name Label of the project name, normally IOS or Android. Required only, if your app_id is provided.
app_id BuddyBuild Application ID. Leave empty to get all the builds for your user token.
url BuddyBuild Build Query url
access_token Secret token string for the existing user to be used to authenticate against BuddyBuild REST API (if BUILDBUDDY_ACCESS_TOKEN environment variable is set, this setting is overwritten)
build_id Leave empty to get the latest build. Provide the build ID to query that specific build.
branch Name of the branch

Bamboo

Supports Bamboo build service

{
  "name": "Bamboo",
  "configuration": {
    "url": "http://yourbamboo.com",
    "planKey": "Plan-Key",
    "username": "user",
    "password": "pass",
    "includeAllStates": true,
    "latestBuildPerBuildPlanOnly": true
  }
}
Setting Description
url URL of the Bamboo host
planKey Plan-Key
username HTTP-Basic-Auth Username (optional)
password HTTP-Basic-Auth Password (optional)
includeAllStates include in-progress/stopped state (optional)
latestBuildPerBuildPlanOnly request only latest build per build plan. The behavior is similar to monitor.latestBuildOnly but this setting limits number of results returned from Bamboo server instead of retrieving all builds and limiting from the application (optional)

BambooDeploy

Supports BambooDeploy deployment service

{
  "name": "BambooDeploy",
  "configuration": {
    "url": "http://yourbamboo.com",
    "planKey": "Plan-Key",
    "username": "user",
    "password": "pass",
    "includeAllStates": true,
    "latestBuildPerBuildPlanOnly": true,
    "environmentName": "dev",
    "projectId": 123
  }
}
Setting Description
url URL of the Bamboo host
planKey Plan-Key
username HTTP-Basic-Auth Username (optional)
password HTTP-Basic-Auth Password (optional)
includeAllStates include in-progress/stopped state (optional)
latestBuildPerBuildPlanOnly request only latest build per build plan. The behavior is similar to monitor.latestBuildOnly but this setting limits number of results returned from Bamboo server instead of retrieving all builds and limiting from the application (optional)
environmentName Environment Name of the deployment region (dev, prod etc)
projectId ProjectId for the PlanKey/Project

Bitbucket Pipelines

Supports Bitbucket Pipelines build service.

In order to monitor a Bitbucket pipeline, one has to create an app-password by navigating to https://bitbucket.org/account/user/<username>/app-passwords

Once "Create app password" has been clicked, one has to ensure that the "read pipelines" box has been checked. Once this box has been checked, click "create" and an AppPassword will be returned that has to be copied to the config.json:

{
  "name": "BitbucketPipelines",
  "configuration": {
    "apiKey": "key",
    "username": "username",
    "slug": "slug",
    "teamname": "teamname"
  }
}
Setting Description
apiKey The API key on the Bitbucket settings
username The account username
slug The name of the project
teamname The team owner of the project. Only use this if the team is the project owner.

Buildkite

Supports Buildkite build service

{
  "name": "Buildkite",
  "configuration": {
    "orgSlug": "your-organisation-slug",
    "teamSlug": "everyone"
  }
}
Setting Description
orgSlug Organization slug, visible in the url when on the pipelines page (e.g https://buildkite.com/<your-organisation-slug>)
teamSlug An team slug to filter the pipelines on, set to everyone for all pipelines
BUILDKITE_TOKEN An ENVIRONMENT VARIABLE with your access token. See: graphql-api for instructions on generating your token.

Bitrise

Supports the Bitrise build service.

{
  "name": "Bitrise",
  "configuration": {
    "slug": "<ID OF YOUR APPLICATION>",
    "token": "<YOUR PERSONAL API TOKEN>"
  }
}
Setting Description
slug APP ID of your application
url Build / API server url, defaults to bitrise.io
token API access token (can be generated in account settings)
apiVersion API version to use, defaults to v0.1

CCTray

Supports CCTray format. CCTray is part of CruiseControl.NET.

{
  "name": "CCTray",
  "configuration": {
    "url": "<URL FOR CCTRAY>"
  }
}
Setting Description
url Url of CCTray feed.

Shippable

Supports the Shippable build service.

{
  "name": "Shippable",
  "configuration": {
    "url": "https://api.shippable.com",
    "token": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee",
    "projects": "123456789012345678901234,098765432109876543210987,...",
    "branch": "master",
    "limit": 12
  }
}
Setting Description
url Shippable API URL (default https://api.shippable.com)
token Shippable API token (can be generated under Account settings)
projects Comma separated list of Shippable project IDs to be used
branch The branch to be monitored (all branches if not specified)
limit Limit the number of returned results from the Shippable API

PRTG

Supports the PRTG monitoring service.

{
  "name": "PRTG",
  "configuration": {
    "url": "https://myprtg.myserver",
    "sensorId": "1234",
    "username": "username",
    "passhash": "123456789"
  }
}
Setting Description
url PRTG Service URL (e.g. https://prtg.mydomain.local)
sensorId Sensor Identifier
username Name of the user
passhash Passhash of the user (Visible under Configuration - My Account)

CircleCI

Supports the CircleCI service

{
  "name": "CircleCI",
  "configuration": {
    "debug": false,
    "token": "somePersonalToken",
    "vcs": "bitbucket",
    "username": "marcells",
    "project": "node-build-monitor",
    "branch": "master",
    "groupByWorkflow": true
  }
}
Setting Description
debug Should the debug be enabled
token A CircleCI personal token
vcs The VCS type of the project (bitbucket
username Project username or team name
project Project name (usually your repository)
branch Optional. A specific branch to display exclusively.
groupByWorkflow Optional. Groups jobs by workflow. Default false.

Drone

Supports the Drone build service (version 1.0 minimum)

{
  "name": "Drone",
  "configuration": {
    "debug": false,
    "url": "drone.company.io",
    "token": "s0meDr0neMachineToken",
    "slug": "marcells/node-build-monitor"
  }
}
Setting Description
slug The name of the build (usually your GitHub user name and the project name)
url The Drone CI server (cloud.drone.io, ci.company.io...)..
token The Drone access token, to access the builds. We recommand generating a machine token using the Drone CLI command drone user add build-monitor --machine.
branch Set this value to filter the builds from a specific branch. (ie. master)
event Set this value to filter the builds from a specific event. (ie. push, promote, pull_request)

Run the standalone version (easiest way)

  1. Download the latest release for Linux (x64), MacOS (x64) or Windows (x64)
  2. For MacOS and Linux you need to set the execute permission to run it
    • MacOS: chmod +x node-build-monitor-macos
    • Linux: chmod +x node-build-monitor-linux
  3. Place a file config.json next to the executable (see the description of the file in the configuration section above)
  4. Run the executable
  5. Open your browser and navigate to http://localhost:3000 (switch to fullscreen for the best experience)

Run it manually (during development)

  1. Pull the repository
  2. Run npm install
  3. Place a file config.json in the app folder (see the description of the file in the configuration section above)
  4. If you connect to services, which are using self signed certificates, then you have to set the environment variableNODE_TLS_REJECT_UNAUTHORIZED=0. (More Info)
  5. Run the build monitor with node app/app.js
  6. Open your browser and navigate to http://localhost:3000 (switch to fullscreen for the best experience)

Run grunt to execute the tests and check the source code with JSHint.

Run it with Docker Compose (in production)

You can try out or install the build monitor with Docker Compose easily.

TL;DR: Go to the docker directory, rename the file config.example.json to config.json and edit with your configuration or create config.json file directly. Then run the following commands, which you need.

Below, each commands is explained in detail.

1. Create configuration and set up the build monitor

Place a file config.json next to the docker-compose.*.yml and configure the services:

{
  "monitor": {
    "interval": 30000,
    "numberOfBuilds": 12,
    "latestBuildOnly": false,
    "sortOrder": "date",
    "debug": true
  },
  "services": [
    {
      "name": "Travis",
      "configuration": {
        "slug": "marcells/bloggy"
      }
    },
    {
      "name": "Travis",
      "configuration": {
        "slug": "marcells/node-build-monitor"
      }
    }
  ]
}

See the description of this file in the configuration section above.

2. Build your custom build monitor image and run the container

Build your custom node-build-monitor docker image. This will also include your configuration from the previous step. Afterwards the container is started.

a. Without tfs-proxy

Installing and running node-build-monitor in a docker container for use on the same machine is simple with the following commands:

Run docker-compose from your custom docker-compose.yml:

docker-compose build --pull
docker-compose up -d
b. With tfs-proxy

If you want to get access to the tfs-proxy, then you need a slighly different command, which allows the build monitor container to access the tfs-proxy container.

Run docker-compose from your custom docker-compose.with-tfs-proxy.yml:

docker-compose -f docker-compose.with-tfs-proxy.yml build --pull
docker-compose -f docker-compose.with-tfs-proxy.yml up -d

Ensure that you omit the tfsProxyUrl setting in your config.json, so that it can be determined automatically. Here you'll get more information about container linking.

c. With self-signed-certs

If you connect to services which are using self signed certificates, run docker-compose from your custom docker-compose.with-self-signed-certs.yml:

docker-compose -f docker-compose.with-self-signed-certs.yml build --pull
docker-compose -f docker-compose.with-self-signed-certs.yml up -d

3. Access it with your browser

Now open your browser and navigate to http://localhost:3000 to see your running or finished builds. Switch to fullscreen for the best experience.

(4. Access logs)

You can take a look at the logs of the build monitor by using this command:

docker-compose logs

Run it in Kubernetes as a helm chart

You can use the helm chart to deploy node-build-monitor in your kubernetes cluster.

TL;DR: Go to the charts directory, and deploy it to your cluster with helm install . --name build-monitor. To set the configuration you need to modify the values.yaml file. See Readme in chart folder for more informations.

Theming support

Here you can check out the existing themes. Feel free to add your own and make a pull request. It can be done very easy.

Theme Description Preview
default Works best on bigger screens with a high resolution Demo
lowres Works best on screens with a lower resolution Demo
list Displays the builds as a list, instead of tiles Demo
lingo Describes the build status in form of a hand-written sentence Demo

You can switch the themes by the url parameter theme. e.g.: http://localhost:3000?theme=list

Creating a new theme

If you want to create a new theme, you simply have to create one template file and one stylesheet in the following paths.

  • Stylesheet: app/public/stylesheets/themes/[name of theme]/style.css (you can place dependent css files in this folder)
  • Template: app/public/templates/themes/[name of theme]/.html

Please use a unique class prefix like [name of theme]-theme for your css, so that we do not run into any conflicts with other themes.

A list with the name builds with Knockout.js ViewModels BuildViewModel will be bound to the template. Knockout.js has a very low learning curve and provides a powerful data-binding mechanism.

Just check out the other themes to get sample code. It's quite easy to create new themes.

Additional: Raspberry Pi Configuration

Here are some useful links, how to run the build monitor frontend on a Raspberry Pi.

This sample script can be used in a cronjob to automatically send your screen to sleep mode in the evening and wake it up in the morning.

#!/bin/bash

if [ $1 = 'on' ]; then
  tvservice -p;
  fbset -depth 8;
  fbset -depth 16;
  chvt 6;
  chvt 7;
  echo 'Switched Screen ON!'
fi

if [ $1 = 'off' ]; then
  tvservice -o
  echo 'Switched Screen OFF!'
fi

License

The MIT License (MIT)

Copyright (c) 2017 Marcell Spies (@marcells | http://mspi.es)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

node-build-monitor's People

Contributors

030 avatar alea81 avatar arunkumarsundaramurthy avatar brantone avatar datakurre avatar ddetoni avatar dickschoeller avatar dreanor avatar ehmkah avatar frankzz avatar hpcsc avatar imorpher avatar jmbarbier avatar jokay avatar marcells avatar mark-hypothesis avatar maximelebastard avatar meeces2911 avatar miouge1 avatar mlison avatar nihalsh avatar nkringle avatar ntamas avatar pascalberger avatar pduchnovsky avatar pegieo avatar pgremo avatar sanjusoftware avatar ssonger avatar tom-bea 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-build-monitor's Issues

Filter branches

First of all, thanks for your work!

Can we add the ability to filter branches somehow (we are using on premise Gitlab)? We want to monitor same branch on different slugs. Devs should keep an eye on their own branches locally ;)

node-build-monitor stops working after error and did not recover

Our setup:

  • node-build-monitor with GitLab 10.3.2-ee on Kubernetes 1.8

What I saw:
After 5 days of normal operation, the node-build-monitor the HTTP endpoint resulted in a 504 Gateway Timeout. According to the applications log, an undefined error occurred (see below) and the docker container stoped serving traffic.

Log:

7:26:32 AM | Check for builds...
7:29:42 AM | 10 builds found....
7:30:13 AM | Check for builds...
7:33:07 AM | 10 builds found....
7:33:43 AM | Check for builds...
**********************************************************************
An error occured when fetching builds for the following configuration:
----------------------------------------------------------------------
undefined
----------------------------------------------------------------------

{ Error: socket hang up
    at TLSSocket.onHangUp (_tls_wrap.js:1116:19)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9) code: 'ECONNRESET' }
**********************************************************************


7:37:51 AM | 0 builds found....
7:37:54 AM | builds changed
7:39:59 AM | Check for builds...

What I expected:
The application would go back to normal operation.

What I did and could do to solve the problem temporarily:
After a restart of the node-build-monitor pod/container, the application resumed normal operation.
To prevent this from happening I could simply configure a health check on the HTTP endpoint of the service and Kubernetes would restart the application automatically if it stops working.

Now, this may solve the problem for me on Kubernetes but it would be more convenient if the application would recover by itself. Is this a known issue and planned to be fixed? =)

GitlabCI showing wrong build status.

Hi!
I just caught a tiny problem in the GitlabCI support. As you're fetching for jobs (as the GitlabAPI v3 only supports a /builds/ route) and not pipelines (not supported in the GitlabAPI v3), if I'm running a pipeline with the last stage having multiple jobs running, the status of the pipeline will show up in the monitor as the status of the last completed job in the stage, instead of the status of the pipeline.

There are some alternatives to solve this issue, one of them is supporting GitlabAPI v4 (which I do not prefer solely because my company will not be updating Gitlab soon, and we're stuck with the v3 :P) and the other is simply making the code a little bit more complex. I don't know how complex you wish your code to be, so I'm forking the project and will be making some tests.

Just letting you know about this problem and hopefully having some insight from you.

PS: Sorry for my english, not my native language. If I've not been clear in any of my message, please feel free to say it and I'll try to explain with other words.

Cya!

Demo doesn't work

Your demo page (https://builds.mspi.es/) just shows a big empty page with no builds.

I suspect its because there's no recent results? I don't know though. Had to download and try out the sample to see how it looks.

Jenkins jobs do not show Running status

The Jenkins API returns a status of SUCCESS when builds are running. It is necessary to check the value of building to identify a running job. This impacts the calls to and implementation of getStatus and getStatusText in Jenkins.js.

0 buils founds with GitLab

Hello,
I have a small problems to run node-build-monitor with GitLab.
I use Docker in production, so I have a Dockerfile and a config.js like :

{
  "monitor": {
    "interval": 30000,
    "numberOfBuilds": 12,
    "latestBuildOnly": false,
    "sortOrder": "date",
    "debug": true
  },
  "services": [
    {
      "name": "GitLab",
      "configuration": {
        "url": "https://gitlab.mycompagny.fr",
        "token": "myGitlabUserToken",
        "additional_query": "&search=mygroup&starred=true",
        "numberOfPipelinesPerProject": 3,
        "slugs": [
          {
            "project": "mygroup/myproject",
            "ref": "master"
          },
          {
            "project": "mygroup/myproject",
            "ref": "develop"
         }
        ]
      }
    }
  ]
}

but I have no results on the website and in my docker logs I get :

$ docker logs --tail all node-build-monitor

warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
9:32:37 AM | Check for builds...
9:32:37 AM | 0 builds found....
node-build-monitor 0.9.24 is listening on port 3000
9:33:07 AM | Check for builds...
9:33:07 AM | 0 builds found....

For information, my Gitlab uses a self-signed certificate.

Thank you for your help ;)

improving Gitlab-CI display

I have two features I would like to have in the gitlab-ci plugin.

  1. Gitlab-CI have different stages during a build, like "test", "build", "deploy". The interface is not showing this information.

  2. beeing able to display only a number of builds per project.
    For now I'm displaying all the builds for "stared" projects. Let's say I display 10 builds and I try to build "project A" 11 times, I will only see the status of project A in the dashboard.
    I would like to be able to say "I want the last 3 builds of each project", maybe grouped by project...

I'm really no nodejs expert so it will be hard for me to help with that, but looking at your code I'm really sure it could be quite easy for a trained dev :

maybe for 1) it would be a rewrite of the project name to include the "stage" ?
for 2) it would be a more complicated filter, at the same place where you sort by date/project ?

I'll ask a friend of mine who is a nodejs dev if he can help, but let me know if you have any clue/time for such features.

Great work btw !

Can't add buddybuild

I keep getting this error when trying to add a buddybuild to the config file

BuddyBuild.js:140
node-build-monitor 0.9.16 is listening on port 3000
/Users/san/Desktop/build-monitor/build-monitor/app/services/BuddyBuild.js:140
            var asyncBuildsQuery = body.map(function (app) {
                                        ^

TypeError: body.map is not a function
    at /Users/san/Desktop/build-monitor/build-monitor/app/services/BuddyBuild.js:140:41
    at Request._callback (/Users/san/Desktop/build-monitor/build-monitor/app/services/BuddyBuild.js:42:21)
    at Request.self.callback (/Users/san/Desktop/build-monitor/build-monitor/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/Users/san/Desktop/build-monitor/build-monitor/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/Users/san/Desktop/build-monitor/build-monitor/node_modules/request/request.js:1091:12)
    at IncomingMessage.g (events.js:292:16)

Process finished with exit code 1

The service in the config file:

    {
      "name": "BuddyBuild",
      "configuration": {
        "project_name": "IOS",
        "app_id": "",
        "url": "https://dashboard.buddybuild.com/apps/5939*rest is ommitted*",
        "access_token": "JnsQSLH6k0d*rest is ommitted*",
        "build_id": "",
        "branch": "develop"
      }
    }

Teamcity integration broken with TC 10.0

In TC 10.x var requestFinishedBuilds = makeRequest.bind(this, getFinishedBuildsUrl());returns a correct URL and also a valid data set, however the monitor still reports 0 builds found, any ideas what this could be?

body.value undefined

I'm getting the following error for our on-site TFS2015 build server. I get this with the latest release for windows, linux, and directly running from node on a Raspberry Pi.

Printing environment Variables...
    PORT = unset (Default: 3000)
    NODE_TLS_REJECT_UNAUTHORIZED = 0
node-build-monitor is starting...
11:13:53 AM | Check for builds...
node-build-monitor 0.9.27 is listening on port 3000...
C:\snapshot\node-build-monitor\app\services\Tfs2015.js:27
            for (var i = 0; i < body.value.length; i++) {
                                          ^

TypeError: Cannot read property 'length' of undefined
    at forEachResult (C:\snapshot\node-build-monitor\app\services\Tfs2015.js:27:43)
    at C:\snapshot\node-build-monitor\app\services\Tfs2015.js:82:17
    at Request._callback (C:\snapshot\node-build-monitor\app\requests.js:23:11)
    at Request.init.self.callback (C:\snapshot\node-build-monitor\node_modules\request\request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (C:\snapshot\node-build-monitor\node_modules\request\request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (C:\snapshot\node-build-monitor\node_modules\request\request.js:1091:12)

Have I not configured it correctly?
It exits with this error with the several valid log-ins I have tried and for all my projects that I am able to view from a browser at the given url.

{
  "monitor": {
    "interval": 15000,
    "numberOfBuilds": 12,
    "latestBuildOnly": false,
    "sortOrder": "date",
    "debug": true
  },
  "services": [
    {
      "name": "Tfs2015",
      "configuration": {
        "url": "http://<MyBuildServer>:8080/tfs/DefaultCollection/<MyProject>",
        "username": "<MyUserName>",
        "password": "<MyPassword>"
      }
    }
  ]
}

TeamCity service doesn't show if build configurations are paused

It would be useful to have an indication of whether a TeamCity build configuration is paused (i.e. all triggers have been disabled, so the CI test isn't currently active).

If a test passes and is then paused for a long time, it can be misleading for the build monitor to show it as successful.

The TeamCity service gets information about specific builds in time, which doesn't give us any information about whether the build configuration they belong to is paused. However, we can find out whether the build config is paused with this API call:

https://teamcity-server/app/rest/buildTypes/id:BuildConfigurationId/paused

Perhaps the grey colour can be used to indicate a paused config, as well as a cancelled build.

Render project and user avatars

It might be useful to render project avatars (and possibly users) next to builds. This should make it easier to recognise specific projects when you have several on the screen.

This might not be available in all services (would require some research - will collate list here if needed).

GitLab

Hide Gitlab projects without gitlab-ci configuration

Hi, this build monitor does help us a lot!

We have Gitlab with a lot of repositories. And are moving to gitlab-ci builds. So not all projects have valid configurations to show. And not all projects will have one.

Can we hide the projects which don't have a pipeline configuration when using / to select all projects?
Now the projects without a pipeline configuration are shown gray with <repro-name>/undefined.

The workaround for now is to define every project in the slugs tag which gets a pipeline configuration. But this is pretty time consuming to maintain.

Maybe it's already possible but are we missing it. Or else I would like to propose this as a new feature.

Keep up the good work!

What about extensions?

Hi @marcells.

In the description of your repository, you said that your project can be easily extended.
I'm planning to contribute for GitlabCI and I want some advices. Do you have some code that facilitate an integration of a new service? How can I start a new integration?

Thanks

Add the name of the Gitlab "stage" in each job

Gitlab-CI have different stages during a build, like "test", "build", "deploy". It also have the notion of an environment, like "dev", "uat", "prod"....

The interface is not showing this information.

Please add this information in each job when using Gitlab backend.
It could be added next to the repository name ?

Last build seems to habe broken gitlab support

So I noticed yesterday I had an issue updating my builds after restarting my container.

After some back and forth I found this :

1:45:52 PM | GitLab | url: http://gitlab
1:45:52 PM | GitLab | slugs: [ '*/*' ]
1:45:52 PM | GitLab | intervals: { disabled: 3600000, empty: 60000, default: 60000 }
1:45:52 PM | GitLab | debug: true
node-build-monitor is listening on port 3000
1:45:52 PM | GitLab | Fetching new projects...
1:45:52 PM | GitLab | Fetching http://gitlab/api/v3/projects?page=1&per_page=100
crypto.js:74
  this._handle.update(data, encoding);
               ^

TypeError: Data must be a string or a buffer
    at Hash.update (crypto.js:74:16)
    at generateAndApplyETags (/build-mon/app/monitor.js:14:18)
    at /build-mon/app/monitor.js:168:13
    at /build-mon/node_modules/async/lib/async.js:52:16
    at done (/build-mon/node_modules/async/lib/async.js:246:17)
    at /build-mon/node_modules/async/lib/async.js:44:16
    at /build-mon/app/monitor.js:162:17
    at /build-mon/app/services/GitLab.js:456:21
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
error: Forever detected script exited with code: 1

I havent updated or changed anythign onthe gitlab side I only restarted the container. I did also try to rebuild the container locally but same result.

Cannot see job details when working with Jenkins

Hi,

This looks very cool project and I'm trying to integrate it with my team's Jenkins.
I configured config.json with two jobs we have, and I do get the jobs, but only with their build number and status. On the documents, I could see that much more data can be visible (job's name, running status and more).

Probably I'm configuring something wrong?

Here is what I get (as you can understand from the build numbers, there are 2 interleaving jobs here):

image

Gitlab to use pipeline api instead of job api

Since Build Dashboard monitor is really interested in reflecting the current state of a specific branch and not really the "latest build(job)" in a specific branch, it would be useful to use the pipeline API to reflect the same. The API is
/api/v4/projects/<project_id>/pipelines?ref=master

I will make the necessary changes and raise a pull request as well soon.

TFS 2017 Unexpected token

Hiya I have been struggling with this for some time now. I have tried stand-alone and node both.

We using TFS 2017 latest patches = only non stock on setup was SSL and NTLM (TFSConfig Authentication /provider:NTLM /siteType:ApplicationTier)

    {
      "name": "Tfs2015",
      "configuration": {
        "url": "https://de-tfs-01/tfs/source/products",
		"authentication": "ntlm",
		"username": "CORP\\a.myaccount",
		"password": "p5pqmydk6fhpas3j2gpylxowsvw7szic"
      }
    }

This is the output

node-build-monitor 0.9.27 is listening on port 3000...
undefined:1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
^

SyntaxError: Unexpected token < in JSON at position 0
    at Object.parse (native)
    at C:\snapshot\node-build-monitor\app\requests.js:13:30
    at finalCallback (C:\snapshot\node-build-monitor\node_modules\httpreq\lib\httpreq.js:98:7)
    at IncomingMessage.<anonymous> (C:\snapshot\node-build-monitor\node_modules\httpreq\lib\httpreq.js:376:9)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

im also running non SSL on 8080 so tried that and also with / without NTLM also went back to lab box withs stock TFS 2017 that I did a clean install on - and no joys there too.

Anything i can do to troubleshoot?

Gitlab slugs - support for subgroups

Hi, first of all, great dashboard!
I'm testing it with Gitlab and Jenkins and noticed there is no simple way to filter "team" projects out of Gitlab. We use subgroups and when I specify slug like "my-team-group/*" I end up with only direct group projects. Other, nested in subgroups of this group are not visible in dashoard. So I coded such support by myself.

I fixed it that way:

In Gitlab.js

I changed this line

indexOfNamespace = matchers.indexOf(project.namespace.path + "/*"),

With that:

function startsWithMatcher(matcher) {
    prefix = matcher.replace("/*","")
    return project.namespace.full_path.startsWith(prefix)
}

var indexOfNamespace = matchers.findIndex(startsWithMatcher),

So now "my-team-group/*" will include all child subgroups folders. Also, it works for "my-team-group/my-more-specific-group/*" subgroups and so on.

What do you think? I know it's not backward compatible so I guess some config property for this will be nice.
If you find it worth adding but don't have time, I can prepare pull request.

EDIT:

You may also ask why didn't I just filter it out by additionalQuery. Well in gitlab each subgroup is a different group and search criteria only matches whole group name, no wildcards. So I can only filter by one group a time.

Does this work with TFS Git Repos

Hi,

I've an on-premise TFS 2015 server and was wondering if this works with the git repositories on TFS. Currently, I've the following configuration in my config.json but can't seem to get it to work. Any help on this is greatly appreciated and I apologize if this is already documented somewhere.

node-build-monitor version: v0.9.21
TFS : 2015 on-premise
Client OS: Windows 7 x64

{
	"monitor": {
		"interval": 30000,
		"numberOfBuilds": 12,
		"latestBuildOnly": false,
		"sortOrder": "date",
		"debug": true
	},
	"services": [{
		"name": "Tfs2015",
		"configuration": {
			"url": "http://tfs-server:8080/tfs/DefaultCollection/_git/TeamProject",
			"authentication": "ntlm",
			"username": "DOMAIN\\USERNAME",
			"password": "PASSWORD"
		}
	},
	{
		"name": "Tfs2015",
		"configuration": {
			"url": "http://tfs-server:8080/tfs/DefaultCollection/TeamProject",
			"authentication": "ntlm",
			"username": "DOMAIN\\USERNAME",
			"password": "PASSWORD"
		}
	},
	{
		"name": "Tfs2015",
		"configuration": {
			"url": "http://tfs-server:8080/tfs/DefaultCollection/TeamProject",
			"authentication": "ntlm",
			"username": "DOMAIN\\USERNAME",
			"password": "PASSWORD"
		}
	}]
}

Showing default values

It is showing me default build of this repo. My config.json is:

{ "monitor": { "interval": 300, "numberOfBuilds": 12, "debug": true }, "services": [ { "name": "Travis", "configuration": { "url": "https://travis-ci.org", "token": "my-token", "slug": "rajatguptarg/beacons" } } ] }

Can't add gitlab

I apologize if this is the wrong place to ask this!

I am trying to use this tool with Team City and Gitlab.
It works great for Team City but it does not show any results from Gitlab.
Can someone please give some idea what I am doing wrong?
I don't quite understand the "slugs" field so that's probably the problem?

We're using GitLab Community Edition 8.6.3 and the link to the project I want to see builds from is https://gitlab-group.st.myDomain.net/mbs/mbsInternal

This is my .json file:

{
  "monitor": {
    "interval": 30000,
    "numberOfBuilds": 1,
    "latestBuildOnly": false,
    "sortOrder": "date",
    "debug": true
  },
  "services": [
    {
      "name": "TeamCity",
      "configuration": {
        "url": "http://myUser:[email protected]:8080",
        "buildConfigurationId": "Mbs_MasterOnLinux64bitAbs1",
        "branch": "master"
      }
    },
    {
    "name": "GitLab",
    "configuration": {
      "url": "https://gitlab-group.st.myDomain.net:443",
      "token": "myToken",
      "additional_query": "&search=mbs&starred=true",
      "slugs": [
      {
        "project": "mbs/mbsInternal",
        "ref": "master"
      }
      ]
    }
  }
  ]
}

Gitlab build displaying all JOBS, while the intent for a monitor is the state of a specific Branch

Typically, If I have a Branch(say Master Branch), am interested to know the state of the branch at a given point(after every commit). However, for Gitlab, it shows all the jobs that are scheduled, so if I have a branch, which has 2 commits(one causing an issue and the other subsequently fixing it). It would end up as two Jobs and the build monitor displays both of them. Say one is Green and the other is Red, what do I Infer from it w.r.to the "current state" of my Branch?

Bitbucket Pipelines support

Hi,

Anyone else looking for a Bitbucket Pipelines support? Bitbucket Pipelines is getting better, but right now there is no way to have build monitors. The REST API seems good enough to us build an integration.

Any thoughts on this?

Demo link down

The demo link doesn't work anymore. Is it possible to provide a new one?

latestBuildOnly not working for all services

Looks like if the latestBuildOnly flag is set.. only the first build is considered.. this will work fine for services like Travis where we have only one slug.. but for services like gitlab where we have option to specify multiple slugs.. this feature is broken..

Bug running in kubernetes

Hi!
Thanks for having a very good plugin. We run the build-monitor in Kubernetes keeping track of Gitlab builds.

Every once in awhile (Like once a week or so) the gitlab monitor runs blank and the following can be seen in the logs:

4:46:40 AM | 50 builds found....
4:47:10 AM | Check for builds...
/build-mon/app/services/GitLab.js:46
                    pipelines = pipelines.slice(0, self.config.numberOfPipelinesPerProject);
                                          ^
 TypeError: pipelines.slice is not a function
    at /build-mon/app/services/GitLab.js:46:43
    at Request._callback (/build-mon/app/services/GitLab.js:36:17)
    at Request.self.callback (/build-mon/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at Request.&lt;anonymous&gt; (/build-mon/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at IncomingMessage.&lt;anonymous&gt; (/build-mon/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:293:19)
error: Forever detected script exited with code: 1
error: Script restart attempt #26
Printing environment Variables...
    PORT = unset (Default: 3000)
    NODE_TLS_REJECT_UNAUTHORIZED = unset (Default: 1)
node-build-monitor is starting...
4:47:19 AM | Check for builds...
node-build-monitor 0.9.27 is listening on port 3000...
::ffff:10.231.55.108 - - [04/Jan/2018:14:28:27 +0000] "GET /favicon.ico HTTP/1.1" 404 150 "http://example.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"

The pod is not restarted or considered corrupt so it stays in this state until the pod is recreated.
If there is any other information I can provide, please let me know.

An option for multiple Configuration

Typically in Enterprises, there are multiple groups of projects monitored and hence each group would have a page for itself. It would be great if one can have multiple config json files and a unique url to render the dashboard based on the specific config.

This allows for us to have multiple tabs in browser (one for each group) and switch them on a timer.
In the current implementation of the node-build-monitor, i will have to run multiple instances of the node app on different ports as a workaround

Cut new release?

Hey,
Originally I was curious about cutting a new release for all the changes (if they're all completed), but then I also noticed that "latest" is still showing as 0.9.5 (https://github.com/marcells/node-build-monitor/releases) , whereas code is already up to 0.9.8 (and I assume latest changes will bump that up).
T�hanks in advance.

Crash when Gitlab service can't determine commit

`C:\Users\UKJGL01\node-build-monitor\app\services\GitLab.js:101
return job && job.commit.author_name;
^

TypeError: Cannot read property 'author_name' of undefined
at getAuthor (C:\Users\UKJGL01\node-build-monitor\app\services\GitLab.js:101:37)
at simplifyBuild (C:\Users\UKJGL01\node-build-monitor\app\services\GitLab.js:83:31)
at C:\Users\UKJGL01\node-build-monitor\app\services\GitLab.js:58:39
at Request._callback (C:\Users\UKJGL01\node-build-monitor\app\services\GitLab.js:36:17)
at Request.self.callback (C:\Users\UKJGL01\node-build-monitor\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\UKJGL01\node-build-monitor\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
`

Attempting to add as new service for BuildBuddy

What is the minimum require for a build to display?
I attempted to create a new service based on GitLab.js and while it looks like I have no problems accessing the build stats, and the console log shows the correct number of builds and projects the web site either shows the loading animation indefinitely or loads with no build tiles.

Do you happen to have an example service with a mock build which fully displays?

TFS Project Collection named DefaultCollection was not found.

Trying to install using docker

"name": "Tfs",
"configuration": {
"collection": "DefaultCollection",
"accountname": "[email protected]",
"username": "[email protected]",
"password": "xxxxx"
}

VSTS url https://xxxx.visualstudio.com

Error: The TFS Project Collection named DefaultCollection was not found.
at /build-mon/app/services/Tfs.js:75:28
at Request._callback (/build-mon/app/services/Tfs.js:23:21)
at Request.self.callback (/build-mon/node_modules/request/request.js:199:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/build-mon/node_modules/request/request.js:1036:10)
at emitOne (events.js:101:20)
at Request.emit (events.js:188:7)
at IncomingMessage. (/build-mon/node_modules/request/request.js:963:12)
at emitNone (events.js:91:20)
@rengago

SyntaxError: Unexpected end of input

I'm using node v4.4.7 on Ubuntu.

I get the following exception when trying to use the monitor. I configured two Jenkins jobs to be monitored in app/config.json.

3:46:37 PM | Check for builds...
3:46:37 PM | Check for builds...
node-build-monitor is listening on port 3000
3:46:51 PM | 178 builds found....
3:46:51 PM | builds changed
3:46:54 PM | Check for builds...
3:46:54 PM | Check for builds...
undefined:1
..
SyntaxError: Unexpected end of input
at Object.parse (native)
at Request._callback (/home/mwojcie/remote-git/node-build-monitor/node_modules/jenkins-api/lib/main.js:177:33)
at Request.self.callback (/home/mwojcie/remote-git/node-build-monitor/node_modules/request/request.js:199:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request. (/home/mwojcie/remote-git/node-build-monitor/node_modules/request/request.js:1036:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage. (/home/mwojcie/remote-git/node-build-monitor/node_modules/request/request.js:963:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)

Perhaps some exception handling is missing.

Deprecated dependencies need a scrub

Does anyone else get this list of warnings when running npm install?

npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Teamcity

Is there a way of displaying the names of the branches using the service TeamCity.js?
I'm using git flow and would like to display feature branches.

TeamCity service only supports individual build configs, not projects.

On TeamCity, build configurations can be organised into projects. We can get information about the project, including it's status (e.g. SUCCESS or FAILURE) using this API call:

https:/teamcity-server/app/rest/projects/ProjectID

The project status is SUCCESS if all of the build configurations in the project are passing.

For large projects, it can be quite limiting to have node-build-monitor only support individual build configs. For us, there is only so much space on our CI status board (displayed on a wall-mounted TV in the office), and not enough space to show every single build configuration. Being able to show the status of a project would be very helpful for this reason.

I'm not sure the best way to achieve this. Perhaps we can try sending a request for a build config, and if it fails, try sending a request for a project with the same ID. Or, the config.json file could change so that each configuration has a boolean flag for whether it is a project.

The response from querying a project rather than an individual build config will have some different fields, so this would also need to be taken into account.

TeamCity 9

When retrieving builds for TeamCity 9 I get the following error:

Cannot read property 'build' of undefined.

Something is going wrong at selectMany(data, function (x) { return x.build || []; });
in TeamCity.js line 46

Problem to connect to on-premise TFS

I have some problem connecting the build-monitor to our own TFS. In the config.json we have this:
"services": [ { "name": "TFS", "configuration": { "url": "http://q45tfs:8080/tfs/DefaultCollection", "username": "*****************", "password": "*********" } } ]

Running with this configuration gives the following error message:

{ Error: connect ETIMEDOUT 168.61.37.249:443 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: '168.61.37.249', port: 443 }

We do not use SSL and TFS is not available over the Internet.
Where to the address 168.61.37.249 come from? Any help or advice is appreciated.

TypeError: pipelines.slice is not a function

I cloned the repo today and then configured with our GitLab server.
It worked for a couple of hours, but then I got this error:

/Users/wilhelm/dev/node-build-monitor/app/services/GitLab.js:46
                    pipelines = pipelines.slice(0, self.config.numberOfPipelinesPerProject);
                                          ^

TypeError: pipelines.slice is not a function
    at /Users/wilhelm/dev/node-build-monitor/app/services/GitLab.js:46:43
    at Request._callback (/Users/wilhelm/dev/node-build-monitor/app/services/GitLab.js:36:17)
    at Request.self.callback (/Users/wilhelm/dev/node-build-monitor/node_modules/request/request.js:188:22)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (/Users/wilhelm/dev/node-build-monitor/node_modules/request/request.js:1171:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (/Users/wilhelm/dev/node-build-monitor/node_modules/request/request.js:1091:12)

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.