Migration to Drone CI #8
14
.drone.yml
14
.drone.yml
|
@ -3,7 +3,7 @@ name: default
|
|||
type: docker
|
||||
|
||||
environment:
|
||||
CRE_VERSION: 1
|
||||
CRE_VERSION: ${DRONE_BUILD_NUMBER}
|
||||
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_BUILD_NUMBER}
|
||||
CRE_REGISTRY_IMAGE: registry.fyloz.dev:5443/colorrecipesexplorer/backend
|
||||
CRE_PORT: 9090
|
||||
|
@ -26,11 +26,9 @@ steps:
|
|||
|
||||
- name: build
|
||||
image: gradle:7.1-jdk11
|
||||
environment:
|
||||
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_PIPELINE}
|
||||
commands:
|
||||
- gradle bootJar -Pversion=${DRONE_PIPELINE}
|
||||
- mv build/libs/ColorRecipesExplorer-${DRONE_PIPELINE}.jar ${CRE_ARTIFACT_NAME}
|
||||
- gradle bootJar -Pversion=$CRE_VERSION
|
||||
- mv build/libs/ColorRecipesExplorer-$CRE_VERSION.jar $CRE_ARTIFACT_NAME
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
@ -40,8 +38,8 @@ steps:
|
|||
settings:
|
||||
build_args:
|
||||
- JDK_VERSION=11
|
||||
- PORT=$CRE_PORT
|
||||
- ARTIFACT_NAME=${CRE_REGISTRY_IMAGE}
|
||||
- PORT=${CRE_PORT}
|
||||
- ARTIFACT_NAME=${CRE_ARTIFACT_NAME}
|
||||
repo: ${CRE_REGISTRY_IMAGE}
|
||||
tags:
|
||||
- latest
|
||||
|
@ -61,7 +59,7 @@ steps:
|
|||
from_secret: deploy_server_ssh_port
|
||||
DEPLOY_SERVER_SSH_KEY:
|
||||
from_secret: deploy_server_ssh_key
|
||||
DEPLOY_CONTAINER_NAME: cre_backend-$DRONE_BRANCH
|
||||
DEPLOY_CONTAINER_NAME: cre_backend-${DRONE_BRANCH}
|
||||
DEPLOY_SPRING_PROFILES: mysql,rest
|
||||
DEPLOY_DATA_VOLUME: /var/cre/data
|
||||
DEPLOY_CONFIG_VOLUME: /var/cre/config
|
||||
|
|
Loading…
Reference in New Issue