2.0.0 • Published 6 years ago
teamcity-properties v2.0.0
TeamCity properties
Access TeamCity build parameters from Node.js.
Important: from TeamCity build you can only access system.*
parameters.
Installation
Using npm:
npm install --save teamcity-properties
Usage
# test.properties
myCompany.project.name = example
var tcProps = require('teamcity-properties');
// may fail silently (return undefined)
var agentName = tcProps['agent.name'];
// throws if no such property
var projectName = tcProps.get('myCompany.project.name');
// get properties as namespaces (nested objects);
var asObject = tcProps.namespaces();
asObject.myCompany.project.name; // example
References
- TeamCity Docs: Configuring Build Parameters
- TeamCity Docs: Defining and Using Build Parameters in Build Configuration
- TeamCity Docs: Predefined Build Parameters
- Wikipedia: .properties file format
- Kudos to node-properties
LICENSE
MIT