12-user-info-jwt #6
28
.drone.yml
28
.drone.yml
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
global-variables:
|
||||
release: &release ${DRONE_BRANCH##**/}
|
||||
release: &release ${DRONE_TAG}
|
||||
environment: &environment
|
||||
CRE_REGISTRY_IMAGE: registry.fyloz.dev:5443/colorrecipesexplorer/frontend
|
||||
CRE_PORT: 9102
|
||||
|
@ -21,6 +21,9 @@ steps:
|
|||
- echo -n "latest" > .tags
|
||||
when:
|
||||
branch: develop
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: set-docker-tags-release
|
||||
image: *alpine-image
|
||||
|
@ -29,9 +32,10 @@ steps:
|
|||
commands:
|
||||
- echo -n "latest-release,$CRE_RELEASE" > .tags
|
||||
when:
|
||||
branch: release/**
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: containerize
|
||||
- name: containerize-dev
|
||||
image: plugins/docker
|
||||
environment:
|
||||
<<: *environment
|
||||
|
@ -40,7 +44,16 @@ steps:
|
|||
when:
|
||||
branch:
|
||||
- develop
|
||||
- release/**
|
||||
|
||||
- name: containerize-release
|
||||
image: plugins/docker
|
||||
environment:
|
||||
<<: *environment
|
||||
settings:
|
||||
repo: *docker-registry-repo
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy
|
||||
image: alpine:latest
|
||||
|
@ -70,10 +83,11 @@ steps:
|
|||
- ssh -p $DEPLOY_SERVER_SSH_PORT $DEPLOY_SERVER_USERNAME@$DEPLOY_SERVER "docker pull $CRE_REGISTRY_IMAGE:$CRE_RELEASE"
|
||||
- ssh -p $DEPLOY_SERVER_SSH_PORT $DEPLOY_SERVER_USERNAME@$DEPLOY_SERVER "docker run -d -p $CRE_PORT:80 --name=$DEPLOY_CONTAINER_NAME $CRE_REGISTRY_IMAGE:$CRE_RELEASE"
|
||||
when:
|
||||
branch: release/**
|
||||
event:
|
||||
- tag
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- develop
|
||||
- release/**
|
||||
- master
|
||||
event:
|
||||
- tag
|
||||
|
|
Loading…
Reference in New Issue