Update drone CI/CD
continuous-integration/drone/push Build was killed Details
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
FyloZ 2021-08-01 16:23:29 -04:00
parent a2f31f26fd
commit dc1915dcda
Signed by: william
GPG Key ID: 835378AE9AF4AE97
1 changed files with 6 additions and 8 deletions

View File

@ -3,7 +3,7 @@ name: default
type: docker type: docker
environment: environment:
CRE_VERSION: 1 CRE_VERSION: ${DRONE_BUILD_NUMBER}
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_BUILD_NUMBER} CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_BUILD_NUMBER}
CRE_REGISTRY_IMAGE: registry.fyloz.dev:5443/colorrecipesexplorer/backend CRE_REGISTRY_IMAGE: registry.fyloz.dev:5443/colorrecipesexplorer/backend
CRE_PORT: 9090 CRE_PORT: 9090
@ -26,11 +26,9 @@ steps:
- name: build - name: build
image: gradle:7.1-jdk11 image: gradle:7.1-jdk11
environment:
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_PIPELINE}
commands: commands:
- gradle bootJar -Pversion=${DRONE_PIPELINE} - gradle bootJar -Pversion=$CRE_VERSION
- mv build/libs/ColorRecipesExplorer-${DRONE_PIPELINE}.jar ${CRE_ARTIFACT_NAME} - mv build/libs/ColorRecipesExplorer-$CRE_VERSION.jar $CRE_ARTIFACT_NAME
when: when:
branch: branch:
- master - master
@ -40,8 +38,8 @@ steps:
settings: settings:
build_args: build_args:
- JDK_VERSION=11 - JDK_VERSION=11
- PORT=$CRE_PORT - PORT=${CRE_PORT}
- ARTIFACT_NAME=${CRE_REGISTRY_IMAGE} - ARTIFACT_NAME=${CRE_ARTIFACT_NAME}
repo: ${CRE_REGISTRY_IMAGE} repo: ${CRE_REGISTRY_IMAGE}
tags: tags:
- latest - latest
@ -61,7 +59,7 @@ steps:
from_secret: deploy_server_ssh_port from_secret: deploy_server_ssh_port
DEPLOY_SERVER_SSH_KEY: DEPLOY_SERVER_SSH_KEY:
from_secret: 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_SPRING_PROFILES: mysql,rest
DEPLOY_DATA_VOLUME: /var/cre/data DEPLOY_DATA_VOLUME: /var/cre/data
DEPLOY_CONFIG_VOLUME: /var/cre/config DEPLOY_CONFIG_VOLUME: /var/cre/config