Migration to Drone CI #8

Merged
william merged 22 commits from features into master 2021-08-01 17:28:44 -04:00
2 changed files with 14 additions and 11 deletions
Showing only changes of commit b1328e8805 - Show all commits

View File

@ -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

View File

@ -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