54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
local build = import 'lib/build.libsonnet';
|
|
local images = import 'lib/images.libsonnet';
|
|
local environment = import 'lib/node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
|
|
local compose = import 'lib/node_modules/@sigyl/jsonnet-compose/compose.libsonnet';
|
|
local util = import 'lib/util.libsonnet';
|
|
local login = import 'lib/login.libsonnet';
|
|
|
|
|
|
function(config)
|
|
function(
|
|
buildSecrets,
|
|
publicSecrets,
|
|
secretSecrets,
|
|
)
|
|
{
|
|
kind: 'pipeline',
|
|
type: 'docker',
|
|
name: 'print',
|
|
clone: {
|
|
disable: false,
|
|
depth: 0,
|
|
},
|
|
steps:[
|
|
compose(
|
|
std.map(
|
|
function(secret) util.printEnv('env-%s' % config.name, secret),
|
|
buildSecrets +
|
|
publicSecrets +
|
|
secretSecrets
|
|
)
|
|
)
|
|
(
|
|
images(config).ssh {
|
|
settings +: {
|
|
script +: [
|
|
'rm -f env-%s' % config.name,
|
|
],
|
|
},
|
|
},
|
|
) {
|
|
name: 'print env',
|
|
},
|
|
],
|
|
} {
|
|
trigger +: {
|
|
event +: [
|
|
'promote',
|
|
],
|
|
target +: [
|
|
'print',
|
|
],
|
|
},
|
|
}
|