The library exposes an object for each CI service.
To include the library in your project, use:
const cis = require('ci-status')
The getProjects
function of each service always returns an array of projects. The project object follows the attribute names in the Multiple Project Summary Reporting Standard .
Example:
{
name: 'ci-status',
activity: 'Sleeping',
lastBuildStatus: 'Success',
lastBuildLabel: '3',
lastBuildTime: '2018-09-20T08:26:43.000Z',
nextBuildTime: null,
webUrl: 'https://travis-ci.com/ovhemert/ci-status'
}
Type: String
(required)
The name of the project.
Type: String
(required)
Enum: Sleeping
, Building
, CheckingModifications
The current state of the project.
Type: String
(required)
Enum: Success
, Failure
, Exception
, Unknown
A brief description of the last build.
Type: String
(optional)
A referential name for the last build.
Type: String (date/time)
(required)
When the last build occurred.
Type: String (date/time)
(optional)
When the next build is scheduled to occur (or when the next check to see whether a build should be performed is scheduled to occur).
Type: String (url)
(required)
URL for where more detail can be found about the project.
The appveyor
object exposes functions related to the AppVeyor service.
Example:
const projects = await cis.appveyor.getProjects({
owner: 'ovhemert',
repo: 'ci-status'
})
Returns an array of projects. See Project
.
Type: String
(required)
Example: ovhemert
User account the repositories belong to.
Type: String
(required)
Example: ci-status
The name of the repository your interested in.
The codepipeline
object exposes functions related to the AWS Codepipeline service.
Example:
const projects = await cis.codepipeline.getProjects({
name: 'test-project-pipeline',
region: 'us-east-1'
})
Returns an array of projects. See Project
.
Type: String
(required)
Example: test-project-pipeline
The name of the pipeline you're interested in.
Type: String
(required)
Example: us-east-1
The AWS region in which your pipeline resides.
The jenkins
object exposes functions related to the Jenkins service.
Example:
const projects = await cis.jenkins.getProjects({
url: 'http://localhost:8080/',
user: 'ovhemert',
token: '116237544ebea73f9a27ffebadb3961859'
})
Returns an array of projects. See Project
.
Type: String
(optional)
Example: ci-status
The name of the project your interested in. By default, Jenkins will return all available projects. This option filters the list and returns only the project with the specified name.
Type: String
(required)
Example: 116237544ebea73f9a27ffebadb3961859
API token (preferred) or the password of the user.
Type: String
(required)
Example: http://localhost:8080/
The full host url to connect to.
Type: String
(required)
Example: ovhemert
User account that has permissions to view the projects.
The travis
object exposes functions related to the Travis CI service.
Example:
const projects = await cis.travis.getProjects({
owner: 'ovhemert',
repo: 'ci-status'
})
Returns an array of projects. See Project
.
Type: String
(optional)
Example: production
Show build status for specific branch.
Type: String
(required)
Example: ovhemert
User account the repositories belong to.
Type: String
(optional)
Example: ci-status
The name of the repository your interested in.
Type: String
(optional)
Example: 116237544ebea73f9a27ffe
API token of the user. To show private projects, you need to specify this property.