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

This commit is contained in:
FyloZ 2021-08-01 12:42:01 -04:00
parent aa4f0ebe88
commit c442ef2005
Signed by: william
GPG Key ID: 835378AE9AF4AE97
1 changed files with 20 additions and 7 deletions

View File

@ -3,22 +3,35 @@ name: default
type: docker
environment:
CRE_VERSION: $DRONE_PULL_REQUEST
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-$CRE_VERSION
CRE_VERSION: 1
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${CRE_VERSION}
CRE_REGISTRY_IMAGE: registry.fyloz.dev:5443/colorrecipesexplorer/backend
CRE_PORT: 9090
steps:
- name: bla
image: alpine:latest
environment:
TEST: ${DRONE_BRANCH}
commands:
- echo $TEST
- echo ${DRONE_BRANCH}
- name: test
image: gradle:7.1-jdk11
commands:
- gradle test
when:
branch:
- master
- name: build
image: gradle:7.1-jdk11
environment:
CRE_ARTIFACT_NAME: ColorRecipesExplorer-backend-${DRONE_PIPELINE}
commands:
- gradle bootJar -Pversion=$CRE_VERSION
- mv build/libs/ColorRecipesExplorer-$CRE_VERSION.jar $CRE_ARTIFACT_NAME
- gradle bootJar -Pversion=${DRONE_PIPELINE}
- mv build/libs/ColorRecipesExplorer-${DRONE_PIPELINE}.jar ${CRE_ARTIFACT_NAME}
when:
branch:
- master
@ -29,11 +42,11 @@ steps:
build_args:
- JDK_VERSION=11
- PORT=$CRE_PORT
- ARTIFACT_NAME=[ CRE_REGISTRY_IMAGE ]
repo: $CRE_REGISTRY_IMAGE
- ARTIFACT_NAME=${CRE_REGISTRY_IMAGE}
repo: ${CRE_REGISTRY_IMAGE}
tags:
- latest
- $CRE_VERSION
- ${CRE_VERSION}
when:
branch:
- master