Hi all
I have the following pipeline:
---
kind: pipeline
type: docker
name: Create artifact
steps:
- name: Build JAR files
image: openjdk:11.0.7-jdk-buster
commands:
- ./mvnw clean
- ./mvnw install
when:
branch:
- master
- name: tag the commit
image: hub.pod.databaker.io/devops/git-auto-tagger:0.1.15
settings:
repo: ${DRONE_GIT_HTTP_URL}
user: oceanstack
pw:
from_secret: gitpw
pre: ""
commands:
- git_tagger
- sleep 1
when:
branch:
- master
- name: publish to hub
image: plugins/docker
pull: if-not-exists
settings:
username: stackhub
password:
from_secret: hubpw
repo: hub.pod.databaker.io/services/databaker-keycloak
dockerfile: ./Dockerfile
registry: https://hub.pod.databaker.io/
tags: ${DRONE_SEMVER_SHORT}
when:
event:
- tag
- name: Here, I would like to do the deployment
.....
when:
event:
- tag
image_pull_secrets:
- dockerconfig
As the last step of the pipeline, I would like to deploy the container via docker-compose to the same host as Drone CI is running on.
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cd9631f0b61f drone/drone-runner-docker:1.2.1 "/bin/drone-runner-d…" 2 weeks ago Up 47 hours 0.0.0.0:3001->3000/tcp drone-runner
96b10d7ac1fd drone/drone:1.6.5 "/bin/drone-server" 2 weeks ago Up 47 hours 80/tcp, 443/tcp drone
The question is, what is the best approach to do the deployment mentioned above?
Hint: drone-runner-exec is also installed on the host.
Thanks