godfather/.drone.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

2022-12-18 04:34:17 +03:00
kind: pipeline
type: docker
name: haiti-framework
steps:
2022-12-18 06:29:36 +03:00
2022-12-18 04:34:17 +03:00
- name: publish maven central
2022-12-18 06:24:54 +03:00
image: maven:3.8.5-openjdk-17
2022-12-18 06:57:06 +03:00
privileged: true
2022-12-18 04:34:17 +03:00
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
2022-12-18 06:18:33 +03:00
SSH_KEY:
from_secret: SSH_KEY
2022-12-18 14:42:26 +03:00
SSH_CONFIG:
from_secret: SSH_CONFIG
2022-12-18 04:34:17 +03:00
commands:
2022-12-18 14:28:40 +03:00
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
2022-12-18 14:42:26 +03:00
- echo "$SSH_KEY" >> ~/.ssh/id_rsa
- echo "$SSH_CONFIG" >> ~/.ssh/config
2022-12-18 14:37:00 +03:00
- echo "$SSH_KEY" | ssh-add -
2022-12-18 16:46:08 +03:00
- ssh-keyscan github.com >> ~/.ssh/known_hosts
2022-12-18 14:28:40 +03:00
- echo "test" >> test.txt
- git add --all
- git commit -m test
2022-12-18 14:42:40 +03:00
- git remote add deploy ssh://git@public-git/Godfather-Bots/godfather.git
2022-12-18 14:31:01 +03:00
- git remote -v
2022-12-18 14:28:40 +03:00
- git push deploy HEAD:master
2022-12-18 10:46:13 +03:00
2022-12-18 10:40:30 +03:00
# - ssh-keyscan -t rsa git.struchkov.dev >> ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts
# - 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 -T 1C -U release:clean release:prepare release:perform --batch-mode
2022-12-18 04:34:17 +03:00
trigger:
2022-12-18 05:35:56 +03:00
branch:
- master
2022-12-18 04:34:17 +03:00
volumes:
- name: m2
host:
path: /drone/volume/m2