ghost/.drone/drone-home.jsonnet

79 lines
1.7 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: '',
name: 'ghost',
root: 'stack'
};
local defs = [
{
load: 'alpine/git:v2.26.2@sha256:8715680f27333935bb384a678256faf8e8832a5f2a0d4a00c9d481111c5a29c0',
save: 'alpine/git:v2.26.2'
},
{
load: 'ghost:3.14.0@sha256:38fb60af996dca89632e848c32e8c155d6dd20578c129752bd5449f99028fa92',
save: 'ghost:3.14.0'
},
{
load: 'mysql:5.7@sha256:ce6815027949d0b48e3097a94fa3ec062866a78868d50c7900c697c13574599f',
save: 'mysql:5.7'
},
];
[
register,
registry(
config {
script: 'sh .drone/scripts/initialise-images.sh',
secrets: [],
images: defs,
},
),
save(config)(
defs,
[
'my-ghost',
],
),
print(config)(
[],
publicSecrets,
secretSecrets,
),
build(config)(
['THEME'],
),
deploy(config)(
[
'THEME',
],
publicSecrets,
secretSecrets,
[
'SCHEME',
'DOMAIN',
'REGISTRY_DOMAIN',
'REGISTRY_PORT',
'REGISTRY_PASSWORD',
],
) {
trigger +: {
event +: [
'promote',
],
target +: [
'production',
],
},
}
]