10.0.0 • Published 4 months ago
screwdriver-template-validator v10.0.0
Template Validator
A module for validating and parsing a Screwdriver Template file
yaml
# example.yaml
name: tkyi/nodejs_main
version: 2.0.1
description: |
Template for a NodeJS main job. Installs the NPM module dependencies and executes
the test target.
maintainer: tiffanykyi@gmail.com
config:
image: node:4
steps:
- install: npm install
- test: npm test
environment:
NODE_ENV: production
secrets:
- NPM_TOKEN
Usage
$ npm install screwdriver-template-validator
Validate in Node.js:
const fs = require('fs'); // standard fs module
const validator = require('screwdriver-template-validator');
// The "example.yaml" is the YAML described above
validator(fs.readFileSync('example.yaml'))
.then((templateData) => {
console.log(templateData);
});
Output of the console.log():
{
"name": "tkyi/nodejs_main",
"version": "2.0.1",
"description": "Template for a NodeJS main ...", //truncated for brevity
"maintainer": "tiffanykyi@gmail.com",
"config": {
"environment": {
"NODE_ENV": "production"
},
"image": "node:4",
"secrets": [
"NPM_TOKEN"
],
"steps": [{
"install": "npm install"
}, {
"test": "npm test"
}]
}
}
Testing
npm test
License
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
10.0.0
4 months ago
9.0.0
10 months ago
8.1.0
1 year ago
8.2.0
11 months ago
8.0.0
1 year ago
7.0.1
1 year ago
7.0.0
2 years ago
6.0.0
3 years ago
5.2.0
4 years ago
5.1.2
4 years ago
5.1.1
4 years ago
5.1.0
4 years ago
5.0.2
4 years ago
5.0.1
4 years ago
5.0.0
4 years ago
4.0.2
4 years ago
4.0.1
5 years ago
3.4.0
5 years ago
4.0.0
5 years ago
3.3.0
5 years ago
3.2.0
5 years ago
3.1.0
6 years ago
3.0.6
6 years ago
3.0.5
7 years ago
3.0.4
7 years ago
3.0.3
7 years ago
3.0.2
8 years ago
3.0.1
8 years ago
3.0.0
8 years ago
2.0.0
8 years ago
1.0.0
8 years ago