2020-10-23 00:03:07 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(
|
2020-10-23 19:20:40 +00:00
|
|
|
images(config).ssh() {
|
2020-10-23 00:03:07 +00:00
|
|
|
settings +: {
|
|
|
|
script +: [
|
|
|
|
'rm -f env-%s' % config.name,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
) {
|
|
|
|
name: 'print env',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} {
|
|
|
|
trigger +: {
|
|
|
|
event +: [
|
|
|
|
'promote',
|
|
|
|
],
|
|
|
|
target +: [
|
|
|
|
'print',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|