Skip to content
forked from jakkaj/yamlw

A task to output YAML or JSON. Take build variables and write them to the build directory. Updates existing files or create them from scratch.

License

Notifications You must be signed in to change notification settings

gregservera/yamlw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yamlw

Extension on the Visual Studio Marketplace.

YouTube video of the VSTS YamlWriter task.

A package or command line to output YAML based on input parameters. Take build variables and write them to files.

Updates existing files or create them from scratch.

It will edit existing values and add new ones, including deep paths.

npm install yamlw

CLI Usage

This tool will wither create a non-existing file or edit and existing file. Use --dry-run to not save the result - just print it on screen.

Given this original file

replicaCount: 1
image:
  repository: jakkaj/sampletrainer
  tag: dev
  pullPolicy: IfNotPresent
outputs:
  modelfolder: /mnt/azure/
  mountpath: /mnt/azure
build:
  number: 1
yamlw -f samples/sample.yaml --set "build.number=23,something.else='my value'"
replicaCount: 1
image:
  repository: jakkaj/sampletrainer
  tag: dev
  pullPolicy: IfNotPresent
outputs:
  modelfolder: /mnt/azure/
  mountpath: /mnt/azure
build:
  number: 23
something:
  else: my value

Module Usage

var yamlwriter = require('yamlw');

var dry = true; //dry run, will not write file
var set = "build.number=23,something.else='my value'";
yamlwriter('/path/to/file', dry, set);

About

A task to output YAML or JSON. Take build variables and write them to the build directory. Updates existing files or create them from scratch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%