drone / autoscaler

Automatically adds or removes instances based on build volume
https://autoscale.drone.io
Other
193 stars 89 forks source link

Add template functions for userdata #104

Closed iainlane closed 2 years ago

iainlane commented 3 years ago

It's good to have some common useful functions available. In particular I wanted to use nindent to include a via write_files.

bradrydzewski commented 3 years ago

we have our own function library that was extracted from the hugo library that we use for across many Drone repositories. I would therefore recommend bringing drone/funcmap into this repository.

iainlane commented 3 years ago

I'll take a look when I get a moment, thanks. From a quick glance I don't see indent which is what I'm currently using from sprig. So I'll have to first do a PR to funcmap to add that.

iainlane commented 2 years ago

Alright, I've done as requested. This depends on https://github.com/drone/funcmap/pull/2.

Note that I need to have Funcs rather than SafeFuncs as we're fetching from the environment and env is not safe by funcmap's definition.