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