Skip to content

GriffinGroupGlobal/jinja2cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

template

$ cat template.j2

{{ title }}
 - {{ DATA1 }}
 - {{ DATA2 }}

data

$ cat data.yml

title: Matt
DATA1: Hello!
DATA2: Dogs are great!

render

Then you can render this template by executing

$ docker run --rm -v `pwd`:/data --workdir=/data -e PLUGIN_TEMPLATE=template.j2 -e PLUGIN_DATA=data.yml -e PLUGIN_OUTFILE=out git push --set-upstream origin 540619935031.dkr.ecr.us-east-1.amazonaws.com/jinja2cli:master
$ cat out
My Title

CI/CD

This also doubles as a [drone][drone] plugin. Thus the name of the environment variables are important.

Note: Using ENV variables instead of command line variables. Named parameters are more transferable and also allows this to be used in CI setups.

Credits

About

G3 jinja 2 utility

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors