drone/.drone/lib/build.libsonnet

23 lines
628 B
Plaintext
Raw Normal View History

2020-08-14 11:31:34 +00:00
local images = import 'images.libsonnet';
local environment = import '../node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet';
images.docker {
name +: 'build:',
environment +: environment.environmentSecrets([
'LOCAL_DOCKER_REGISTRY',
'REGISTRY_PASSWORD',
]),
volumes: [
{
name: 'dockersock',
path: '/var/run',
},
],
commands: [
'set -e',
'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${REGISTRY_PASSWORD}"',
'sh build.sh',
'sh push.sh',
'docker logout $${LOCAL_DOCKER_REGISTRY}',
],
}