haiti-utils-field-constants/.drone.yml

112 lines
2.4 KiB
YAML
Raw Normal View History

2023-01-23 15:17:25 +03:00
---
kind: pipeline
type: docker
name: snapshot-publish
trigger:
branch:
- develop
volumes:
- name: m2
host:
path: /drone/volume/m2
2024-06-24 15:45:34 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 15:17:25 +03:00
2024-06-24 15:45:34 +03:00
steps:
2023-01-23 15:17:25 +03:00
- name: publish
2024-06-24 15:34:05 +03:00
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
2023-01-23 15:17:25 +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
---
kind: pipeline
type: docker
name: release-maven-central
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
2024-06-24 15:45:34 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 15:17:25 +03:00
2024-06-24 15:45:34 +03:00
steps:
2023-01-23 15:17:25 +03:00
- name: publish maven central
2024-06-24 15:34:05 +03:00
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
2023-01-23 15:17:25 +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 20:51:47 +03:00
- apk add gnupg
2023-01-23 15:17:25 +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
---
kind: pipeline
type: docker
name: release-struchkov-nexus
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
2024-06-24 15:45:34 +03:00
image_pull_secrets:
- DOCKER_AUTH
2023-01-23 15:17:25 +03:00
2024-06-24 15:45:34 +03:00
steps:
2023-01-23 15:17:25 +03:00
- name: publish struchkov nexus
2024-06-24 15:34:05 +03:00
image: hub.docker.struchkov.dev/maven:3.9-eclipse-temurin-17-alpine
2023-01-23 15:17:25 +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 20:51:47 +03:00
- apk add gnupg
2023-01-23 15:17:25 +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
---
kind: signature
2024-06-24 15:45:34 +03:00
hmac: 62899422b538523cb09e3756b7bebe1658e4093f6c6a3e2dd8c9c8f872558e54
2023-01-23 15:17:25 +03:00
...