2020-08-15 09:43:20 +00:00
|
|
|
local images = import 'images.libsonnet';
|
2020-08-19 20:01:46 +00:00
|
|
|
local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
|
2020-10-23 00:03:07 +00:00
|
|
|
local login = import 'login.libsonnet';
|
2020-08-15 09:43:20 +00:00
|
|
|
|
2020-09-23 18:58:49 +00:00
|
|
|
function(config)
|
2020-09-24 12:48:43 +00:00
|
|
|
function(secrets)
|
|
|
|
images(config).docker {
|
|
|
|
name +: 'build:',
|
|
|
|
environment +: environment.environmentSecrets(secrets),
|
|
|
|
volumes: [
|
|
|
|
{
|
|
|
|
name: 'dockersock',
|
|
|
|
path: '/var/run',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
commands: [
|
|
|
|
'set -e',
|
2020-10-23 00:03:07 +00:00
|
|
|
'export NAME=%s' % config.name,
|
|
|
|
'export ROOT=%s' % config.root,
|
|
|
|
login,
|
2020-09-24 12:48:43 +00:00
|
|
|
'sh .drone/build.sh',
|
|
|
|
'sh .drone/push.sh',
|
|
|
|
],
|
|
|
|
}
|