2020-10-23 00:03:07 +00:00
|
|
|
local build = import 'lib/build.libsonnet';
|
|
|
|
local images = import 'lib/images.libsonnet';
|
|
|
|
local environment = import 'lib/node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
|
|
|
|
local compose = import 'lib/node_modules/@sigyl/jsonnet-compose/compose.libsonnet';
|
|
|
|
local util = import 'lib/util.libsonnet';
|
|
|
|
local login = import 'lib/login.libsonnet';
|
|
|
|
|
|
|
|
|
|
|
|
function(config)
|
|
|
|
function(
|
|
|
|
buildSecrets,
|
|
|
|
)
|
|
|
|
{
|
|
|
|
kind: 'pipeline',
|
|
|
|
type: 'docker',
|
|
|
|
name: 'build',
|
|
|
|
clone: {
|
|
|
|
disable: false,
|
|
|
|
depth: 0,
|
|
|
|
},
|
|
|
|
services: [
|
2020-10-23 19:20:40 +00:00
|
|
|
images(config).docker() {
|
2020-10-23 00:03:07 +00:00
|
|
|
privileged: true,
|
|
|
|
volumes: [
|
|
|
|
{
|
|
|
|
name: 'dockersock',
|
|
|
|
path: '/var/run',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'ca',
|
|
|
|
path: '/etc/docker/certs.d',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'daemonjson',
|
|
|
|
path: '/etc/docker/daemon.json',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
volumes: [
|
|
|
|
{
|
|
|
|
name: 'dockersock',
|
|
|
|
temp: {},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'ca',
|
|
|
|
host: {
|
|
|
|
path: '/etc/docker/certs.d',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'daemonjson',
|
|
|
|
host: {
|
|
|
|
path: '/etc/docker/daemon.json',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
steps:[
|
|
|
|
build(config)(buildSecrets),
|
|
|
|
],
|
2020-10-23 07:56:44 +00:00
|
|
|
} {
|
|
|
|
trigger +: {
|
|
|
|
event +: [
|
|
|
|
'promote',
|
|
|
|
],
|
|
|
|
target +: [
|
|
|
|
'build',
|
|
|
|
],
|
2020-10-23 08:04:48 +00:00
|
|
|
},
|
|
|
|
}
|