jsonnet-drone/lib/util.libsonnet

18 lines
597 B
Plaintext
Raw Permalink Normal View History

2020-08-19 20:01:46 +00:00
local compose = import 'node_modules/@sigyl/jsonnet-compose/compose.libsonnet';
local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
2020-08-15 09:43:20 +00:00
{
printEnv(file, env): function(step) compose([
environment.envSet(env),
function(step) step {
settings +: {
script +: [
'echo "export %(environment)s=\'$${%(environment)s}\'" >> %(file)s # "%(secret)s"' % {
environment: environment.environment(env),
file: file,
secret: environment.secret(env),
},
],
},
},
])(step),
}