Migration to Drone CI #8

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

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