v2 #4
77
.drone.yml
77
.drone.yml
|
@ -1,60 +1,33 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: check-build
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check
|
- name: build
|
||||||
image: denoland/deno:alpine-1.34.3
|
when:
|
||||||
commands:
|
|
||||||
- ./build.sh
|
|
||||||
when:
|
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- pull_request
|
||||||
|
image: denoland/deno:alpine-1.39.1
|
||||||
|
commands:
|
||||||
|
- deno task build
|
||||||
|
|
||||||
- name: build docker image
|
- name: publish
|
||||||
image: plugins/docker
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
registry: registry.greenbaum.cloud
|
host: nachtigall.pub.solar
|
||||||
repo: registry.greenbaum.cloud/pub_solar/miom.space
|
port: 22
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- ${DRONE_TAG}
|
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: ps_ssh_user
|
||||||
password:
|
key:
|
||||||
from_secret: docker_password
|
from_secret: ps_ssh_key
|
||||||
when:
|
source:
|
||||||
event:
|
- ./_site/*
|
||||||
- tag
|
target: /srv/www/pub.solar/
|
||||||
|
overwrite: true
|
||||||
---
|
strip_components: 1
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: deploy
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: deploy
|
|
||||||
image: registry.greenbaum.cloud/library/triton-docker
|
|
||||||
environment:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: docker_username
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
TRITON_SSH_KEY:
|
|
||||||
from_secret: triton_ssh_key
|
|
||||||
TRITON_ACCOUNT:
|
|
||||||
from_secret: triton_account
|
|
||||||
TRITON_URL: https://lev-1.api.greenbaum.cloud
|
|
||||||
TRITON_KEY_ID: 59:9f:5a:6f:c4:e2:3b:32:7f:13:1f:de:b7:59:80:85
|
|
||||||
PROJECT_NAME: miomspace
|
|
||||||
commands:
|
|
||||||
- mkdir -p $HOME/.ssh $HOME/.docker
|
|
||||||
- echo -e "$TRITON_SSH_KEY" > $HOME/.ssh/id_rsa
|
|
||||||
- /usr/local/bin/docker-entrypoint.sh ./deploy.sh $DRONE_TAG
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- promote
|
|
||||||
- rollback
|
|
||||||
target:
|
|
||||||
- production
|
|
||||||
|
|
Loading…
Reference in a new issue