feat: Add automatic docker build when tagged on master
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is failing Details

kalle 2022-06-05 13:10:32 +02:00
parent 8e0e16d1f4
commit 01c7bec038
2 changed files with 22 additions and 2 deletions

View File

@ -21,7 +21,21 @@ steps:
from_secret: "gitea_base_url"
files: build/libs/CSharpCommentChecker-*.jar
when:
branch:
- master
event:
- tag
- name: "Push docker image"
image: plugins/docker
settings:
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"
repo:
from_secret: "docker_repo"
tags: latest
auto_tag: true
when:
event:
- tag

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM eclipse-temurin:16-jdk
RUN mkdir /opt/validation
COPY build/libs/CSharpCommentChecker-*.jar /opt/validation/
RUN mv /opt/validation/CSharpCommentChecker-*.jar /opt/validation/CSharpCommentChecker.jar