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 19:22:53 +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 = [
|
|
|
|
{
|
2021-10-04 16:11:12 +00:00
|
|
|
load: 'drone/drone:2.4.0@sha256:8c1c83ed0f68b00e16ca50b8769e6cf7ccb3c5ff390036eaec7e5fcb79c3cb92',
|
|
|
|
save: 'drone/drone:2.4.0'
|
2020-10-23 09:24:14 +00:00
|
|
|
},
|
|
|
|
{
|
2023-06-16 10:29:10 +00:00
|
|
|
load: 'drone/drone-runner-docker:1.8.3@sha256:31d8534f559b26b76fb292eec957b852999a338cbd48284980cd483c04373f9a',
|
|
|
|
save: 'drone/drone-runner-docker:1.8.3'
|
2020-10-23 09:24:14 +00:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
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 19:22:53 +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
|
|
|
]
|