drone/.drone/drone-home.jsonnet

55 lines
1.0 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 config = {
registry: '',
};
[
register,
registry(
config {
script: 'sh .drone/scripts/initialise-images.sh',
secrets: [
'REGISTRY_DOMAIN',
'REGISTRY_PORT',
'REGISTRY_PASSWORD'
],
},
) {
trigger +: {
event +: [
'promote',
],
target +: [
'registry',
],
},
},
deploy(config)(
'drone',
'/stack/',
[
'REGISTRY_DOMAIN',
'REGISTRY_PORT',
'REGISTRY_PASSWORD',
],
publicSecrets,
secretSecrets,
[],
) {
trigger +: {
event +: [
'promote',
],
target +: [
'production',
],
},
},
]