guacamole/.drone/drone-home.jsonnet

108 lines
1.9 KiB
Plaintext

local secretSecrets = import 'lib/secret-secrets.libsonnet';
local publicSecrets = import 'lib/public-secrets.libsonnet';
local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet';
local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet';
local registry = import 'node_modules/@sigyl/jsonnet-drone/registry.libsonnet';
local save = import 'node_modules/@sigyl/jsonnet-drone/save.libsonnet';
local build = import 'node_modules/@sigyl/jsonnet-drone/build.libsonnet';
local print = import 'node_modules/@sigyl/jsonnet-drone/print.libsonnet';
local config = {
registry: '',
root: 'stack',
name: 'guacamole',
};
local defs = [
{
load: 'postgres:12.4',
save: 'postgres:12.4'
},
{
load: 'guacamole/guacd:1.2.0',
save: 'guacamole/guacd:1.2.0',
},
{
load: 'guacamole/guacamole:1.2.0',
save: 'guacamole/guacamole:1.2.0',
},
];
[
register,
registry(
config {
// script: 'sh .drone/scripts/initialise-images.sh',
secrets: [],
images: defs,
},
) {
trigger +: {
event +: [
'promote',
],
target +: [
'registry',
],
},
},
save(config)(
defs,
) {
trigger +: {
event +: [
'promote',
],
target +: [
'save',
],
},
},
print(config)(
[],
publicSecrets,
secretSecrets,
) {
trigger +: {
event +: [
'promote',
],
target +: [
'print',
],
},
},
build(config)(
[],
) {
trigger +: {
event +: [
'promote',
],
target +: [
'build',
],
},
},
deploy(config)(
[],
publicSecrets,
secretSecrets,
[
'REGISTRY_DOMAIN',
'REGISTRY_PORT',
'REGISTRY_PASSWORD',
],
) {
trigger +: {
event +: [
'promote',
],
target +: [
'production',
],
},
},
]