jsonnet-drone/lib/build.libsonnet

24 lines
643 B
Plaintext
Raw Normal View History

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';
local login = import 'login.libsonnet';
2020-08-15 09:43:20 +00:00
function(config)
function(secrets)
2020-10-23 19:20:40 +00:00
images(config).docker() {
name +: 'build:',
environment +: environment.environmentSecrets(secrets),
volumes: [
{
name: 'dockersock',
path: '/var/run',
},
],
commands: [
'set -e',
'export NAME=%s' % config.name,
'export ROOT=%s' % config.root,
login,
'sh .drone/build.sh',
'sh .drone/push.sh',
],
}