{"id":22351881,"url":"https://github.com/screwdriver-cd/template-validator","last_synced_at":"2025-07-30T07:31:55.587Z","repository":{"id":48822647,"uuid":"83486025","full_name":"screwdriver-cd/template-validator","owner":"screwdriver-cd","description":"A tool used to validate a Job Template and Pipeline Template","archived":false,"fork":false,"pushed_at":"2024-08-30T22:16:33.000Z","size":86,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-09T13:54:32.191Z","etag":null,"topics":["screwdriver","templates","validation"],"latest_commit_sha":null,"homepage":"https://cd.screwdriver.cd/pipelines/88","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/screwdriver-cd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-28T22:32:38.000Z","updated_at":"2024-08-30T22:14:57.000Z","dependencies_parsed_at":"2024-03-12T15:50:57.466Z","dependency_job_id":"0bbcce87-c392-4131-aba7-a8c43a3bf92e","html_url":"https://github.com/screwdriver-cd/template-validator","commit_stats":{"total_commits":32,"total_committers":10,"mean_commits":3.2,"dds":0.65625,"last_synced_commit":"f578e8594d408f5ef7fd724b3ba40dde15497ee0"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Ftemplate-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Ftemplate-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Ftemplate-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Ftemplate-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/screwdriver-cd","download_url":"https://codeload.github.com/screwdriver-cd/template-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228106387,"owners_count":17870438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["screwdriver","templates","validation"],"created_at":"2024-12-04T12:16:14.221Z","updated_at":"2024-12-04T12:16:14.767Z","avatar_url":"https://github.com/screwdriver-cd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template Validator\n[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]\n\n\u003e A module for validating and parsing a Screwdriver Template file\n\n## yaml\n\n```yaml\n# example.yaml\nname: tkyi/nodejs_main\nversion: 2.0.1\ndescription: |\n  Template for a NodeJS main job. Installs the NPM module dependencies and executes\n  the test target.\nmaintainer: tiffanykyi@gmail.com\nconfig:\n  image: node:4\n  steps:\n    - install: npm install\n    - test: npm test\n  environment:\n    NODE_ENV: production\n  secrets:\n     - NPM_TOKEN\n\n```\n\n## Usage\n\n\n```bash\n$ npm install screwdriver-template-validator\n```\n\nValidate in Node.js:\n\n```javascript\nconst fs = require('fs');  // standard fs module\nconst validator = require('screwdriver-template-validator');\n\n// The \"example.yaml\" is the YAML described above\nvalidator(fs.readFileSync('example.yaml'))\n    .then((templateData) =\u003e {\n        console.log(templateData);\n    });\n```\n\nOutput of the console.log():\n\n```javascript\n{\n    \"name\": \"tkyi/nodejs_main\",\n    \"version\": \"2.0.1\",\n    \"description\": \"Template for a NodeJS main ...\",  //truncated for brevity\n    \"maintainer\": \"tiffanykyi@gmail.com\",\n    \"config\": {\n        \"environment\": {\n            \"NODE_ENV\": \"production\"\n        },\n        \"image\": \"node:4\",\n        \"secrets\": [\n            \"NPM_TOKEN\"\n        ],\n        \"steps\": [{\n            \"install\": \"npm install\"\n        }, {\n            \"test\": \"npm test\"\n        }]\n    }\n}\n```\n\n\n\n\n\n## Testing\n\n```bash\nnpm test\n```\n\n## License\n\nCode licensed under the BSD 3-Clause license. See LICENSE file for terms.\n\n[npm-image]: https://img.shields.io/npm/v/screwdriver-template-validator.svg\n[npm-url]: https://npmjs.org/package/screwdriver-template-validator\n[downloads-image]: https://img.shields.io/npm/dt/screwdriver-template-validator.svg\n[license-image]: https://img.shields.io/npm/l/screwdriver-template-validator.svg\n[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/template-validator.svg\n[issues-url]: https://github.com/screwdriver-cd/template-validator/issues\n[status-image]: https://cd.screwdriver.cd/pipelines/88/badge\n[status-url]: https://cd.screwdriver.cd/pipelines/88\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Ftemplate-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrewdriver-cd%2Ftemplate-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Ftemplate-validator/lists"}