18 lines
597 B
Plaintext
18 lines
597 B
Plaintext
local compose = import 'node_modules/@sigyl/jsonnet-compose/compose.libsonnet';
|
|
local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
|
|
{
|
|
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),
|
|
} |