telegram-bot-spring-boot-st.../.drone.yml
Struchkov Mark ad4082a550
All checks were successful
continuous-integration/drone/push Build is passing
update dependencies and cicd
2024-08-21 13:10:20 +03:00

117 lines
2.6 KiB
YAML

---
kind: pipeline
type: docker
name: snapshot-publish
image_pull_secrets:
- DOCKER_AUTH
trigger:
branch:
- develop
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish
# https://hub.docker.com/_/maven
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
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
image_pull_secrets:
- DOCKER_AUTH
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish maven central
# https://hub.docker.com/_/maven
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
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:
- apk add --no-cache gnupg
- 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
image_pull_secrets:
- DOCKER_AUTH
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish struchkov nexus
# https://hub.docker.com/_/maven
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
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:
- apk add --no-cache gnupg
- 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
# drone sign --save Godfather-Bots/telegram-bot-spring-boot-starter
---
kind: signature
hmac: 93f3708b1af7039d1123b22c8d5451b517042238efc2ff6dac791431c15d55b1
...