Executes container builds in Drone CI using Makisu (https://github.com/uber/makisu)
Attempts to mimic the arguments for the regular docker plugin (http://plugins.drone.io/drone-plugins/drone-docker/) as closely as possible,
including support for a .tags file which will be used if no tags are specified in settings.
this plugin tries to be smart about pushing to AWS ECR registries. If the registry hostname looks like an AWS ECR one, it automatically tries to set up the necessary auth settings. All you need to do is to use environment variables to specify AWS credentials, if the build isn't running with a role that has implicit access to AWS.
The syntax is a bit weird, since it's necessary to specify the docker hub host (index.docker.io). See examples down below for details
Not implemented just yet - coming shortly!
- repo: required. Given the image name
trondhindenes/drone-makisu-plugin:latest, therepofield would bedrone-makisu-plugin. If this parameter is specified asxx/xxandregistryisnt specified, the field will be automatically split into registry and repo. - tags: optional. List of tags to use on the image. Defaults to 'latest'. If this parameter is omitted, and a file called
.tagsis found in the local dir, that file will be used instead. It should contain a comma-separated list of tags to use. - build_args: optional. Dict of build args to use when building the image
- build_args_from_env: optional. List of env vars to convert to build args
- registry: optional. where to push the image. See also
repoabove - dockerfile: optional, defaults to
Dockerfile - debug: optional. Set it to
trueto print more info - storage: optional. specify cache dir for layers
- commit: optional. Defaults to
implicit. Set it toexplicitto use makisu's smart caching feature.
---
kind: pipeline
type: kubernetes
name: default
volumes:
- name: cache
temp: {}
steps:
- name: makisu1
image: trondhindenes/drone-makisu-plugin
pull: always
environment:
country: au
music: jazz
volumes:
- name: cache
path: /cache
settings:
storage: /cache
repo: buildtest
registry: 123.dkr.ecr.eu-west-1.amazonaws.com
build_args:
WHAT: 'hello'
SUM: 'oof'
build_args_from_env:
- country
- music
- name: makisu2
image: trondhindenes/drone-makisu-plugin
pull: always
volumes:
- name: cache
path: /cache
settings:
storage: /cache
repo: buildtest
registry: 123.dkr.ecr.eu-west-1.amazonaws.com
tags:
- latest
- whatregular build and push to docker hub:
- name: docker-hub
image: trondhindenes/drone-makisu-plugin
pull: always
volumes:
- name: cache
path: /cache
settings:
storage: /cache
repo: trondhindenes/drone-makisu-plugin
registry: index.docker.io
tags:
- latestregular build and push to docker hub (alternative version):
- name: docker-hub
image: trondhindenes/drone-makisu-plugin
pull: always
volumes:
- name: cache
path: /cache
settings:
storage: /cache
repo: index.docker.io/trondhindenes/drone-makisu-plugin
tags:
- latest