2020-08-26 23:14:17 +00:00
|
|
|
|
|
|
|
local secretSecrets = import 'lib/secret-secrets.libsonnet';
|
|
|
|
local publicSecrets = import 'lib/public-secrets.libsonnet';
|
|
|
|
|
|
|
|
local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet';
|
2020-08-26 23:28:07 +00:00
|
|
|
local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet';
|
2020-09-24 13:08:36 +00:00
|
|
|
local registry = import 'node_modules/@sigyl/jsonnet-drone/registry.libsonnet';
|
2020-10-23 09:24:14 +00:00
|
|
|
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';
|
2020-10-23 16:58:06 +00:00
|
|
|
local droneImages = import 'node_modules/@sigyl/jsonnet-drone/drone-images.libsonnet';
|
2020-09-24 13:08:36 +00:00
|
|
|
|
|
|
|
local config = {
|
|
|
|
registry: '',
|
2020-10-23 09:24:14 +00:00
|
|
|
name: 'drone',
|
|
|
|
root: 'stack'
|
2020-09-24 13:08:36 +00:00
|
|
|
};
|
2020-10-23 09:24:14 +00:00
|
|
|
|
|
|
|
local defs = [
|
|
|
|
{
|
|
|
|
load: 'drone/drone:1.9.1@sha256:f07d1719b75a404c142b95b47598d7658805359d2416e8f36ddfc0385120e9a6',
|
|
|
|
save: 'drone/drone:1.9.1'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
load: 'drone/drone-runner-docker:1.5.3@sha256:8554bbb53c482324f544091ec9b6e855e8581cb27cb9fbfb2c38fd4574dfcd8e',
|
|
|
|
save: 'drone/drone-runner-docker:1.5.3'
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2020-08-26 23:14:17 +00:00
|
|
|
[
|
2020-08-26 23:28:07 +00:00
|
|
|
register,
|
2020-09-24 13:08:36 +00:00
|
|
|
registry(
|
|
|
|
config {
|
2020-09-24 13:57:50 +00:00
|
|
|
secrets: [
|
|
|
|
'REGISTRY_DOMAIN',
|
|
|
|
'REGISTRY_PORT',
|
|
|
|
'REGISTRY_PASSWORD'
|
|
|
|
],
|
2020-10-23 09:24:14 +00:00
|
|
|
images: defs,
|
2020-09-24 13:08:36 +00:00
|
|
|
},
|
2020-10-23 09:24:14 +00:00
|
|
|
),
|
|
|
|
save(config)(
|
|
|
|
defs,
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
print(config)(
|
|
|
|
[],
|
|
|
|
publicSecrets,
|
|
|
|
secretSecrets,
|
|
|
|
),
|
|
|
|
build(config)(
|
|
|
|
[],
|
|
|
|
),
|
2020-10-23 16:58:06 +00:00
|
|
|
droneImages(config),
|
2020-09-24 13:08:36 +00:00
|
|
|
deploy(config)(
|
2020-08-26 23:14:17 +00:00
|
|
|
[
|
2020-08-28 20:51:50 +00:00
|
|
|
'REGISTRY_DOMAIN',
|
|
|
|
'REGISTRY_PORT',
|
2020-08-26 23:14:17 +00:00
|
|
|
'REGISTRY_PASSWORD',
|
2020-10-21 11:01:04 +00:00
|
|
|
'SCHEME',
|
2020-08-26 23:14:17 +00:00
|
|
|
],
|
|
|
|
publicSecrets,
|
2020-08-28 20:51:50 +00:00
|
|
|
secretSecrets,
|
|
|
|
[],
|
2020-08-26 23:28:07 +00:00
|
|
|
) {
|
|
|
|
trigger +: {
|
|
|
|
event +: [
|
|
|
|
'promote',
|
|
|
|
],
|
|
|
|
target +: [
|
|
|
|
'production',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-08-26 23:14:17 +00:00
|
|
|
]
|