Update drone CI/CD
This commit is contained in:
parent
63f5ed9139
commit
b1328e8805
17
.drone.yml
17
.drone.yml
|
@ -9,16 +9,17 @@ environment:
|
|||
CRE_PORT: 9090
|
||||
|
||||
steps:
|
||||
# - name: test
|
||||
# image: gradle:7.1-jdk11
|
||||
# commands:
|
||||
# - gradle test
|
||||
# - name: test
|
||||
# image: gradle:7.1-jdk11
|
||||
# commands:
|
||||
# - gradle test
|
||||
|
||||
- name: build
|
||||
image: gradle:7.1-jdk11
|
||||
commands:
|
||||
- gradle bootJar -Pversion=$CRE_VERSION
|
||||
- mv build/libs/ColorRecipesExplorer-$CRE_VERSION.jar $CRE_ARTIFACT_NAME.jar
|
||||
- echo -n "latest,$CRE_VERSION" > .tags
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
@ -26,10 +27,12 @@ steps:
|
|||
- name: containerize
|
||||
image: plugins/docker
|
||||
settings:
|
||||
build_args:
|
||||
- JAVA_VERSION=11
|
||||
build_args_from_env:
|
||||
- CRE_ARTIFACT_NAME
|
||||
- CRE_PORT
|
||||
repo: registry.fyloz.dev:5443/colorrecipesexplorer/backend
|
||||
tags:
|
||||
- latest
|
||||
- $CRE_VERSION
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
|
|
@ -4,11 +4,11 @@ FROM openjdk:$JAVA_VERSION
|
|||
|
||||
WORKDIR /usr/bin/cre/
|
||||
|
||||
ARG ARTIFACT_NAME=ColorRecipesExplorer
|
||||
COPY $ARTIFACT_NAME.jar ColorRecipesExplorer.jar
|
||||
ARG CRE_ARTIFACT_NAME=ColorRecipesExplorer
|
||||
COPY $CRE_ARTIFACT_NAME.jar ColorRecipesExplorer.jar
|
||||
|
||||
ARG PORT=9090
|
||||
EXPOSE $PORT
|
||||
ARG CRE_PORT=9090
|
||||
EXPOSE $CRE_PORT
|
||||
|
||||
ENV spring_profiles_active=h2,rest
|
||||
ENV server_port=$PORT
|
||||
|
|
Loading…
Reference in New Issue