teamcity-build-queue

1.1.4 • Public • Published

teamcity-build-queue

NPM Status Travis Status Coverage Status Dependency Status

The helper to get info about TeamCity Build Queue.

Install

$ npm install --save teamcity-build-queue

Usage

const queueInfo = require('teamcity-build-queue');
 
queueInfo('http://teamcity.domain.com', {
    projectPattern: 'project :: Pull requests :: *',
    ignoreDependencies: true,       // ignore builds with dependencies that have not been built yet
    ignoreIncompatibleAgents: true  // ignore builds without compatible agents
})
.then(queue => {
    console.log(queue.builds);
    console.log(queue.size);
});

API

queueInfo(url[, options])

Returns a Promise, that resolves to object with builds from Build Queue.

url

Type: string

The URL to TeamCity host.

options

Type: object

options.projectPattern

Type: string

The pattern of project name to filter builds.

If pattern is not specified, then all builds will be in the result.

Wildcards

queueInfo('http://teamcity.domain.com', {
    projectPattern: 'project :: Pull requests :: *'
});
 
// Will be taken into account builds the following assemblies:
 
// project :: Pull requests :: build
// project :: Pull requests :: tests :: unit
// project :: Pull requests :: tests :: e2e
// project :: Pull requests :: docs
// project :: Pull requests :: deploy
// ...

Brace Expansion

queueInfo('http://teamcity.domain.com', {
    projectPattern: 'project :: {Pull requests, dev} :: *'
});
 
// Will be taken into account builds the following configurations:
//
// project :: Pull requests :: build
// project :: Pull requests :: tests
// ...
// project :: dev :: build
// project :: dev :: tests
// ...

Read more about it in micromatch package.

options.ignoreDependencies

Type: boolean Default: false

To ignore builds with dependencies that have not been built yet.

options.ignoreIncompatibleAgents

Type: boolean Default: false

To ignore builds without compatible agents.

License

MIT © Andrew Abramov

Package Sidebar

Install

npm i teamcity-build-queue

Weekly Downloads

1

Version

1.1.4

License

MIT

Last publish

Collaborators

  • blond