yateamcity
v0.0.7
Published
yet another teamcity api library for node
Downloads
4
Maintainers
Readme
yateamcity
yet another teamcity library for nodejs
install
npm i yateamcity
const teamcity = require('yateamcity');
API
yateamcity : Object
- 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
- static
yateamcity.setBuildStatus
set build status
Kind: static property of yateamcity
| Param | Type | Description | | --- | --- | --- | | status | String | build status | | [reason] | String | reason |
yateamcity.setBuildProblem
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 |
yateamcity.setBuildName
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 |
yateamcity.getBuildArtifact ⇒ Promise.<Any>
get build artifacts
Kind: static property of yateamcity
Returns: Promise.<Any> - - id latest successful build
| Param | Type | Description | | --- | --- | --- | | _options | Options | options object |
yateamcity.getBuildStatistics ⇒ Promise.<Array.<Object>> | Promise.<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 |
yateamcity.prepareEslintReportForTeamcity
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 |
yateamcity.getBranches ⇒ Promise.<Array>
get branches from teamcity build
Kind: static property of yateamcity
Returns: Promise.<Array> - - list of branches
| Param | Type | Description | | --- | --- | --- | | options | Options | options object |
yateamcity.getProperties
get all availeble options from teamCity
Kind: static property of yateamcity
yateamcity.getLatestSuccessBuildId ⇒ Promise.<String>
get latest successfully build
Kind: static property of yateamcity
Returns: Promise.<String> - - id latest successful build
| Param | Type | Description | | --- | --- | --- | | _options | Options | options object |
yateamcity.isTeamcity ⇒ boolean
check where script was running
Kind: static property of yateamcity
Returns: boolean - - is script running in teamcity
yateamcity~normalizeBuildOptions(options) ⇒ PromiseLike.<object> | Promise.<object>
get normalize build options
Kind: inner method of yateamcity
Returns: PromiseLike.<object> | Promise.<object> - normalized options
| Param | Type | Description | | --- | --- | --- | | options | Options | options object |
yateamcity~Options
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 |
Contributing
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
TODO
- 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 |
-------------|----------|----------|----------|----------|