haiti-framework/.drone.yml

110 lines
2.4 KiB
YAML
Raw Normal View History

2023-01-23 14:42:45 +03:00
---
2022-12-17 12:11:39 +03:00
kind: pipeline
type: docker
2023-01-23 14:42:45 +03:00
name: snapshot-publish
trigger:
branch:
- develop
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish
2023-12-03 09:51:22 +03:00
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
2023-01-23 14:42:45 +03:00
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
2023-12-03 09:51:22 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 14:42:45 +03:00
---
kind: pipeline
type: docker
name: release-maven-central
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
2022-12-17 12:11:39 +03:00
steps:
2022-12-17 16:31:20 +03:00
- name: publish maven central
2023-12-03 09:51:22 +03:00
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
2023-01-23 14:42:45 +03:00
privileged: true
2022-12-17 13:56:15 +03:00
volumes:
2022-12-17 15:54:41 +03:00
- 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
2022-12-17 12:20:07 +03:00
commands:
2023-05-16 16:37:20 +03:00
- apk add gnupg
2022-12-17 15:54:41 +03:00
- 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
2023-12-03 09:51:22 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 14:42:45 +03:00
---
kind: pipeline
type: docker
name: release-struchkov-nexus
2022-12-17 15:54:41 +03:00
trigger:
2022-12-17 16:03:00 +03:00
ref:
- refs/tags/v.*.*.*
2022-12-17 13:56:15 +03:00
volumes:
2022-12-17 15:54:41 +03:00
- name: m2
2022-12-17 13:56:15 +03:00
host:
2023-01-23 14:42:45 +03:00
path: /drone/volume/m2
steps:
- name: publish struchkov nexus
2023-12-03 09:51:22 +03:00
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
2023-01-23 14:42:45 +03:00
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:
2023-05-16 16:37:20 +03:00
- apk add gnupg
2023-01-23 14:42:45 +03:00
- 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
2023-12-03 09:51:22 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 14:42:45 +03:00
---
kind: signature
2023-12-03 09:51:22 +03:00
hmac: b491639a5561dd54943ad6a141fd406aba3c092007cb82eb838b5b3097c4caca
2023-01-23 14:42:45 +03:00
...