squid/.drone/lib/util.libsonnet

18 lines
603 B
Plaintext
Raw Normal View History

2020-08-05 07:30:16 +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-05 07:30:16 +00:00
{
printEnv(file, env): function(step) compose([
environment.envSet(env),
2020-08-05 07:30:16 +00:00
function(step) step {
settings +: {
script +: [
'echo "export %(environment)s=\'$${%(environment)s}\'" >> %(file)s # "%(secret)s"' % {
environment: environment.environment(env),
2020-08-05 07:30:16 +00:00
file: file,
secret: environment.secret(env),
2020-08-05 07:30:16 +00:00
},
],
},
},
])(step),
}