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
|
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
|
||||||
|
|
Loading…
Reference in New Issue