Update drone CI/CD
This commit is contained in:
parent
aa4f0ebe88
commit
c442ef2005
27
.drone.yml
27
.drone.yml
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue