yet another teamcity library for nodejs
npm i yateamcity
const teamcity = require('yateamcity');
- yateamcity :
Object
- static
- .setBuildStatus
- .setBuildProblem
- .setBuildName
- .getBuildArtifact ⇒
Promise.<Any>
- .getBuildStatistics ⇒
Promise.<Array.<Object>>
|Promise.<Object>
- .prepareEslintReportForTeamcity
- .getBranches ⇒
Promise.<Array>
- .getProperties
- .getLatestSuccessBuildId ⇒
Promise.<String>
- .isTeamcity ⇒
boolean
- inner
- ~normalizeBuildOptions(options) ⇒
PromiseLike.<object>
|Promise.<object>
- ~Options
- ~normalizeBuildOptions(options) ⇒
- static
set build status
Kind: static property of yateamcity
Param | Type | Description |
---|---|---|
status | String |
build status |
[reason] | String |
reason |
set build problem
Kind: static property of yateamcity
Param | Type | Description |
---|---|---|
problemDescription | String |
problem description |
problemTypeId | String |
problem id, in future you can what problem trend in teamcity interface |
set build number
Kind: static property of yateamcity
Param | Type | Description |
---|---|---|
buildName | String |
build number, that string will be show in history of branch builds |
get build artifacts
Kind: static property of yateamcity
Returns: Promise.<Any>
- - id latest successful build
Param | Type | Description |
---|---|---|
_options | Options |
options object |
get build statistics
Kind: static property of yateamcity
Returns: Promise.<Array.<Object>>
| Promise.<Object>
- - parameter value or all parameters values if name of the parametr dont send as argument
Param | Type | Default | Description |
---|---|---|---|
[statisticsParameterName] | String |
name of the parameter | |
[buildId] | String |
buildId |
build if |
prepare eslint report for teamcity
Kind: static property of yateamcity
See: https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests
Param | Type | Description |
---|---|---|
eslintReport | Object |
parsed object of eslint results |
get branches from teamcity build
Kind: static property of yateamcity
Returns: Promise.<Array>
- - list of branches
Param | Type | Description |
---|---|---|
options | Options |
options object |
get all availeble options from teamCity
Kind: static property of yateamcity
get latest successfully build
Kind: static property of yateamcity
Returns: Promise.<String>
- - id latest successful build
Param | Type | Description |
---|---|---|
_options | Options |
options object |
check where script was running
Kind: static property of yateamcity
Returns: boolean
- - is script running in teamcity
get normalize build options
Kind: inner method of yateamcity
Returns: PromiseLike.<object>
| Promise.<object>
- normalized options
Param | Type | Description |
---|---|---|
options | Options |
options object |
Kind: inner typedef of yateamcity
Properties
Name | Type | Description |
---|---|---|
serverUrl | string |
base url teamcity with protocol |
login | string |
login |
password | string |
password |
buildTypeId | string |
build type id |
branch | string | function |
branch name or function what return that |
we use Conventional Commits for best changelog and version control
Develop:
- for tests run
npm test
- for codestyle checks run
npm style
- for doc generate run
npm run docs
- for release(generate changelog, add version tag) run
npm run release
. We use package named standart-version and you can use this features
- add doctoc, jsdoc generation for Readme
- add deploy on npm with travis
- improove coverage
- add yaspell checks for readme
-------------|----------|----------|----------|----------|
File | % Stmts | % Branch | % Funcs | % Lines |
-------------|----------|----------|----------|----------|
All files | 52.44 | 19.44 | 51.61 | 52.63 |
teamcity.js | 53.85 | 26.92 | 53.85 | 55 |
utils.js | 47.06 | 0 | 40 | 43.75 |
-------------|----------|----------|----------|----------|