Drone plugin to build and publish fabric8/docker-maven-plugin Docker images.
Maven fabric8 based project can be build in drone using maven docker image.
But either external docker host or docker socket needs to be mounted to maven docker image - volumes: /var/run/docker.sock:/var/run/docker.sock
.
For the same the repository needs to be trusted in drone via an drone admin, which is not scalable or appropriate solution. ^reference
- This plugin builds layer of openJdk, Maven on top of docker-dind
- Provide an entry point to support slice type parameter
scripts
- Brings up docker daemon using DinD.
- Slice type parameters get converted to
;
separated commands and get executed
Example -
pipeline:
build_unit_test:
image: ciscosso/drone-fabric8-docker
pull: true
scripts:
- mvn -B clean package docker:build
Build the Docker image with the following commands:
docker build --rm=true -f Dockerfile -t ciscosso/drone-fabric8-docker .
Execute from the working directory:
docker run --rm \
-e PLUGIN_SCRIPTS="mvn -B clean package docker:build" \
-v $(pwd):$(pwd) \
-w $(pwd) \
--privileged \
ciscosso/drone-fabric8-docker