2022-12-18 01:44:12 +03:00
|
|
|
---
|
2022-12-15 21:38:11 +03:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-12-18 01:44:12 +03:00
|
|
|
name: develop build
|
2022-12-15 21:38:11 +03:00
|
|
|
|
2022-12-18 01:45:39 +03:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- develop
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:20.10.22-dind-alpine3.17
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: m2
|
|
|
|
host:
|
|
|
|
path: /drone/volume/m2
|
|
|
|
- name: dockersock
|
|
|
|
temp: {}
|
|
|
|
|
2022-12-15 21:38:11 +03:00
|
|
|
steps:
|
2022-12-18 01:39:22 +03:00
|
|
|
- name: create jar
|
2022-12-15 21:38:11 +03:00
|
|
|
image: maven:3.8.6-eclipse-temurin-17
|
2022-12-15 21:44:44 +03:00
|
|
|
volumes:
|
|
|
|
- name: m2
|
2022-12-17 18:49:38 +03:00
|
|
|
path: /root/.m2/repository
|
|
|
|
commands:
|
|
|
|
- mvn -U clean package
|
|
|
|
|
2022-12-18 01:39:22 +03:00
|
|
|
- name: docker publish develop
|
2022-12-17 18:49:38 +03:00
|
|
|
image: upagge/docker-buildx:latest
|
|
|
|
environment:
|
|
|
|
DOCKER_REGISTRY_TOKEN:
|
|
|
|
from_secret: DOCKER_REGISTRY_TOKEN
|
|
|
|
DOCKER_IMAGE_NAME:
|
|
|
|
from_secret: DOCKER_IMAGE_NAME
|
|
|
|
DOCKER_REGISTRY_USER:
|
|
|
|
from_secret: DOCKER_REGISTRY_USER
|
2022-12-18 01:21:41 +03:00
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
2022-12-17 18:49:38 +03:00
|
|
|
commands:
|
|
|
|
- echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin
|
|
|
|
- docker buildx create --use
|
2023-01-15 19:14:25 +03:00
|
|
|
- docker buildx build -f Dockerfile-develop --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:develop" .
|
2022-12-15 21:44:44 +03:00
|
|
|
|
2022-12-18 01:44:12 +03:00
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: release build
|
|
|
|
|
2022-12-18 01:45:39 +03:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/tags/v.*.*.*
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:20.10.22-dind-alpine3.17
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: m2
|
|
|
|
host:
|
|
|
|
path: /drone/volume/m2
|
|
|
|
- name: dockersock
|
|
|
|
temp: {}
|
|
|
|
|
2022-12-18 01:44:12 +03:00
|
|
|
steps:
|
|
|
|
- name: create jar
|
|
|
|
image: maven:3.8.6-eclipse-temurin-17
|
|
|
|
volumes:
|
|
|
|
- name: m2
|
|
|
|
path: /root/.m2/repository
|
|
|
|
commands:
|
|
|
|
- mvn -U clean package
|
|
|
|
|
2022-12-18 01:39:22 +03:00
|
|
|
- name: docker publish release
|
|
|
|
image: upagge/docker-buildx:latest
|
|
|
|
environment:
|
|
|
|
DOCKER_REGISTRY_TOKEN:
|
|
|
|
from_secret: DOCKER_REGISTRY_TOKEN
|
|
|
|
DOCKER_IMAGE_NAME:
|
|
|
|
from_secret: DOCKER_IMAGE_NAME
|
|
|
|
DOCKER_REGISTRY_USER:
|
|
|
|
from_secret: DOCKER_REGISTRY_USER
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
commands:
|
|
|
|
- echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin
|
|
|
|
- docker buildx create --use
|
2023-01-15 16:46:32 +03:00
|
|
|
- docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:latest" -t "$DOCKER_IMAGE_NAME:$DRONE_TAG" .
|
2023-02-22 01:03:42 +03:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: create-docs-site
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- docs
|
|
|
|
- master
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build site
|
2023-02-23 13:04:21 +03:00
|
|
|
image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest
|
2023-02-23 13:19:15 +03:00
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
|
|
|
path: ${DRONE_WORKSPACE}/documentation/.cache
|
2023-02-22 01:03:42 +03:00
|
|
|
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
|
|
|
|
- cd documentation
|
2023-02-23 14:23:40 +03:00
|
|
|
- mkdocs build --site-dir gitlab-notification
|
2023-02-22 01:03:42 +03:00
|
|
|
- scp -r -P $SSH_DEPLOY_PORT ./gitlab-notification $SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:$SSH_DEPLOY_PATH
|
|
|
|
|
2023-02-23 13:04:21 +03:00
|
|
|
image_pull_secrets:
|
|
|
|
- DOCKER_AUTH
|
|
|
|
|
2023-02-23 13:19:15 +03:00
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
|
|
|
host:
|
|
|
|
path: /drone/volume/mkdocs_cache/gitlab_notification
|
|
|
|
|
2023-01-15 16:46:32 +03:00
|
|
|
---
|
|
|
|
kind: signature
|
2023-02-23 14:24:24 +03:00
|
|
|
hmac: f740dcba9e4e0d38ddd1789bd5eaa75502af9137c6e6c0710be953c61233d90d
|
2023-01-15 16:46:32 +03:00
|
|
|
|
|
|
|
...
|