telegram-bot/.drone.yml
Struchkov Mark bccafc3faf
All checks were successful
continuous-integration/drone/push Build is passing
Передача сгенерированного сайта на сервер
2023-02-19 18:41:54 +03:00

141 lines
3.1 KiB
YAML

---
kind: pipeline
type: docker
name: snapshot-publish
trigger:
branch:
- develop
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish
image: maven:3.8.5-openjdk-17
privileged: true
volumes:
- name: m2
path: /root/.m2/repository
environment:
MAVEN_SETTINGS:
from_secret: MAVEN_SETTINGS
commands:
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- mvn --settings maven-settings.xml -U -P snapshot clean deploy
---
kind: pipeline
type: docker
name: release-maven-central
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish maven central
image: maven:3.8.5-openjdk-17
privileged: true
volumes:
- name: m2
path: /root/.m2/repository
environment:
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
MAVEN_SETTINGS:
from_secret: MAVEN_SETTINGS
GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE
commands:
- echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
- mvn --settings maven-settings.xml -U -P ossrh,release clean deploy
---
kind: pipeline
type: docker
name: release-struchkov-nexus
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish struchkov nexus
image: maven:3.8.5-openjdk-17
privileged: true
volumes:
- name: m2
path: /root/.m2/repository
environment:
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
MAVEN_SETTINGS:
from_secret: MAVEN_SETTINGS
GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE
commands:
- echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
- mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy
---
kind: pipeline
type: docker
name: create-docs-site
trigger:
branch:
- docs
- master
steps:
- name: build site
image: upagge/mkdocs-material
environment:
SSH_DEPLOY_KEY:
from_secret: SSH_DEPLOY_KEY
SSH_DEPLOY_HOST:
from_secret: SSH_DEPLOY_HOST
SSH_DEPLOY_PORT:
from_secret: SSH_DEPLOY_PORT
SSH_DEPLOY_PATH:
from_secret: SSH_DEPLOY_PATH
SSH_DEPLOY_USER:
from_secret: SSH_DEPLOY_USER
commands:
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "$SSH_DEPLOY_KEY" >> ~/.ssh/id_rsa
- chmod 700 ~/.ssh
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -p $SSH_DEPLOY_PORT $SSH_DEPLOY_HOST >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- mkdocs build
- mv site godfather-telegram
- scp -r -P $SSH_DEPLOY_PORT ./godfather-telegram $SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:$SSH_DEPLOY_PATH
---
kind: signature
hmac: 09512add0dd3f8aeabb73e8b80b5b7fdc5ed902569a6b652e2b6584d8de415fd
...