y-assembly

所属分类:其他
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2019-01-23 16:45:16
上 传 者sh-1993
说明:  y-assembly:Yaml汇编程序,
(y-assembly: A Yaml Assembler,)

文件列表:
.circleci/ (0, 2019-01-23)
.circleci/config.yml (1067, 2019-01-23)
Gopkg.lock (3173, 2019-01-23)
Gopkg.toml (947, 2019-01-23)
LICENSE (1071, 2019-01-23)
bin/ (0, 2019-01-23)
bin/create_new_release.sh (833, 2019-01-23)
cmd/ (0, 2019-01-23)
cmd/yaml/ (0, 2019-01-23)
cmd/yaml/main.go (3245, 2019-01-23)
examples/ (0, 2019-01-23)
examples/.yupfile (86, 2019-01-23)
examples/basefile.yml (39, 2019-01-23)
examples/importlist_A.yml (42, 2019-01-23)
examples/importlist_B.yml (51, 2019-01-23)
makefile (1270, 2019-01-23)
pkg/ (0, 2019-01-23)
pkg/y-assembly/ (0, 2019-01-23)
pkg/y-assembly/combine.go (539, 2019-01-23)
pkg/y-assembly/combine_test.go (865, 2019-01-23)
pkg/y-assembly/expand_aliases.go (691, 2019-01-23)
pkg/y-assembly/expand_aliases_test.go (788, 2019-01-23)
pkg/y-assembly/patch.go (940, 2019-01-23)
pkg/y-assembly/patch_test.go (714, 2019-01-23)
pkg/y-assembly/yassemblyfile.go (995, 2019-01-23)
pkg/y-assembly/yassemblyfile_test.go (3166, 2019-01-23)
test/ (0, 2019-01-23)
test/e2e/ (0, 2019-01-23)
test/e2e/cmd/ (0, 2019-01-23)
test/e2e/cmd/testdata/ (0, 2019-01-23)
test/e2e/cmd/testdata/assembly.yml (750, 2019-01-23)
test/e2e/cmd/testdata/assembly_print.yml (149, 2019-01-23)
test/e2e/cmd/testdata/base/ (0, 2019-01-23)
test/e2e/cmd/testdata/base/base.yml (47, 2019-01-23)
... ...

# y-assembly YAML Plus Imports: y-assembly [![CircleCI](https://circleci.com/gh/xchapter7x/y-assembly.svg?style=svg)](https://circleci.com/gh/xchapter7x/y-assembly) [![Go Report Card](https://goreportcard.com/badge/github.com/xchapter7x/y-assembly)](https://goreportcard.com/report/github.com/xchapter7x/y-assembly) [![GoDoc](https://godoc.org/github.com/xchapter7x/y-assembly?status.svg)](https://godoc.org/github.com/xchapter7x/y-assembly) ### Description This tool is meant to provide some generic "imports" or merging capability. One can combine files and apply patch files which are yaml patch compliant. Combining this functionality with yaml references and/or envsubst, makes for a really powerful and flexible combination. ### Install [Download Latest Releases Here](https://github.com/xchapter7x/y-assembly/releases/latest) ```bash #Linux $ curl -sL https://github.com/xchapter7x/y-assembly/releases/download/v0.4.2/yaml_unix -o yaml && chmod +x yaml && mv yaml /usr/local/bin/. #OSX $ curl -sL https://github.com/xchapter7x/y-assembly/releases/download/v0.4.2/yaml_osx -o yaml && chmod +x yaml && mv yaml /usr/local/bin/. #Windows $ go to https://github.com/xchapter7x/y-assembly/releases/download/v0.4.2/yaml.exe and download ``` ### Use case anywhere you are wrangling yaml (Kubernetes, BOSH, Concourse) this can help. It is generic, specifically built to provide enough flexibility to be used with any tool that likes yaml. ### Assembly.yml fields and file behavior `version`: and integer value representing the compatibility of the assembly record `expand_aliases`: this will expand anchors and aliases in the output files (not dry but pure yaml) `base`: the base file, where all others are appended or modify (can be url or local file) `output`: where the output of the assembly operation will go (must be local) `imports`: an array of urls or local file paths, which will be appended to the base to create the output. the array order is the order in which the files will be combined. `patches`: an array of urls or local file paths, which will be patched on top of the fully assembled set of base and imports. the array order is the order in which the patches will be applied. uses [yaml-patch op files](https://github.com/krishicks/yaml-patch) for full set of commands check the compatible [json patch docs](https://tools.ietf.org/html/rfc6902) ### Example ```bash -> % cd github.com/xchapter7x/y-assembly/test/e2e/cmd -> % cat testdata/assembly.yml --- - version: 1 base: "testdata/base/base.yml" output: "testdata/outputs/cool.yml" imports: - "https://raw.githubusercontent.com/xchapter7x/y-assembly/master/test/e2e/cmd/testdata/imports/import1.yml" - version: 1 base: "testdata/base/base.yml" output: "testdata/outputs/out2.yml" imports: - "testdata/imports/import1.yml" - version: 1 base: "testdata/base/base.yml" output: "testdata/outputs/out3.yml" imports: - "https://raw.githubusercontent.com/xchapter7x/y-assembly/master/test/e2e/cmd/testdata/imports/import1.yml" patches: - "testdata/patches/patch1.yml" -> % ./yaml_osx build -c testdata/assembly.yml -p --- # testdata/outputs/out1.yml somecool: thing which: has lots: - of - stuff - with - even - more - imports --- # testdata/outputs/out2.yml somecool: thing which: has lots: - of - stuff - with - even - more - imports --- # testdata/outputs/out3.yml lots: - of - stuff - with - even - more - imports somecool: thing which: had ```

近期下载者

相关文件


收藏者