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:
|
2023-02-26 14:14:47 +03:00
|
|
|
STRUCHKOV_DOCKER_REGISTRY_TOKEN:
|
|
|
|
from_secret: STRUCHKOV_DOCKER_REGISTRY_TOKEN
|
2023-02-26 14:27:01 +03:00
|
|
|
STRUCHKOV_DOCKER_IMAGE_NAME:
|
|
|
|
from_secret: STRUCHKOV_DOCKER_IMAGE_NAME
|
2022-12-17 18:49:38 +03:00
|
|
|
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:
|
2023-02-26 14:11:22 +03:00
|
|
|
- echo "$STRUCHKOV_DOCKER_REGISTRY_TOKEN" | docker login git.struchkov.dev --username $DOCKER_REGISTRY_USER --password-stdin
|
2022-12-17 18:49:38 +03:00
|
|
|
- echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin
|
|
|
|
- docker buildx create --use
|
2023-02-26 14:24:15 +03:00
|
|
|
- docker buildx build -f Dockerfile-develop --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:develop" -t "git.struchkov.dev/$STRUCHKOV_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:
|
2023-02-26 14:27:01 +03:00
|
|
|
STRUCHKOV_DOCKER_REGISTRY_TOKEN:
|
|
|
|
from_secret: STRUCHKOV_DOCKER_REGISTRY_TOKEN
|
|
|
|
STRUCHKOV_DOCKER_IMAGE_NAME:
|
|
|
|
from_secret: STRUCHKOV_DOCKER_IMAGE_NAME
|
2022-12-18 01:39:22 +03:00
|
|
|
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:
|
2023-02-26 14:24:15 +03:00
|
|
|
- echo "$STRUCHKOV_DOCKER_REGISTRY_TOKEN" | docker login git.struchkov.dev --username $DOCKER_REGISTRY_USER --password-stdin
|
2022-12-18 01:39:22 +03:00
|
|
|
- echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin
|
|
|
|
- docker buildx create --use
|
2023-02-26 14:24:15 +03:00
|
|
|
- docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:latest" -t "$DOCKER_IMAGE_NAME:$DRONE_TAG" -t "git.struchkov.dev/$STRUCHKOV_DOCKER_IMAGE_NAME:latest" -t "git.struchkov.dev/$STRUCHKOV_DOCKER_IMAGE_NAME:$DRONE_TAG" .
|
2023-02-22 01:03:42 +03:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2023-02-24 09:42:09 +03:00
|
|
|
name: create-develop-docs-site
|
2023-02-22 01:03:42 +03:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2023-02-24 09:42:09 +03:00
|
|
|
- develop
|
2023-02-25 13:55:48 +03:00
|
|
|
- docs
|
2023-02-23 18:10:28 +03:00
|
|
|
|
2023-02-23 20:35:50 +03:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
|
2023-02-22 01:03:42 +03:00
|
|
|
steps:
|
2023-02-23 20:35:50 +03:00
|
|
|
|
2023-02-24 09:42:09 +03:00
|
|
|
- name: build docs
|
2023-02-23 22:37:30 +03:00
|
|
|
image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest
|
2023-02-23 21:38:52 +03:00
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
2023-02-25 13:07:11 +03:00
|
|
|
path: ${DRONE_WORKSPACE}/documentation/ru/.cache
|
2023-02-23 18:25:31 +03:00
|
|
|
environment:
|
|
|
|
GIT_SSH:
|
|
|
|
from_secret: GIT_SSH
|
2023-02-23 22:09:08 +03:00
|
|
|
GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_rsa -p 222"
|
2023-02-23 18:10:28 +03:00
|
|
|
commands:
|
2023-02-23 18:25:31 +03:00
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
2023-02-23 22:09:08 +03:00
|
|
|
- echo "$GIT_SSH" >> ~/.ssh/id_rsa
|
2023-02-23 18:25:31 +03:00
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts
|
|
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
|
|
- git config --global user.name "${DRONE_COMMIT_AUTHOR_NAME}"
|
|
|
|
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
2023-02-23 22:09:19 +03:00
|
|
|
- git clone ssh://git@git.struchkov.dev:222/Telegram-Bots/gitlab-notification.git .
|
2023-02-23 20:35:50 +03:00
|
|
|
- git checkout $DRONE_COMMIT
|
2023-02-25 13:07:11 +03:00
|
|
|
- cd documentation/ru
|
|
|
|
- mike deploy --prefix gitlab-notification/ru --branch docs-deploy --push --update-aliases develop
|
2023-02-23 20:35:50 +03:00
|
|
|
|
2023-02-23 18:10:28 +03:00
|
|
|
image_pull_secrets:
|
|
|
|
- DOCKER_AUTH
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
|
|
|
host:
|
2023-02-25 13:07:11 +03:00
|
|
|
path: /drone/volume/mkdocs_cache/gitlab_notification/ru
|
2023-02-23 18:10:28 +03:00
|
|
|
|
2023-01-15 16:46:32 +03:00
|
|
|
---
|
2023-02-24 09:42:09 +03:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: create-release-docs-site
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/tags/v.*.*.*
|
|
|
|
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: build docs
|
|
|
|
image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest
|
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
|
|
|
path: ${DRONE_WORKSPACE}/documentation/.cache
|
|
|
|
environment:
|
|
|
|
GIT_SSH:
|
|
|
|
from_secret: GIT_SSH
|
|
|
|
GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_rsa -p 222"
|
|
|
|
commands:
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo "$GIT_SSH" >> ~/.ssh/id_rsa
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts
|
|
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
|
|
- git config --global user.name "${DRONE_COMMIT_AUTHOR_NAME}"
|
|
|
|
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
|
|
|
- git clone ssh://git@git.struchkov.dev:222/Telegram-Bots/gitlab-notification.git .
|
|
|
|
- git checkout $DRONE_COMMIT
|
2023-02-25 13:55:48 +03:00
|
|
|
- cd documentation/ru
|
|
|
|
- mike deploy --prefix gitlab-notification/ru --branch docs-deploy --push --update-aliases ${DRONE_TAG} latest
|
2023-02-24 09:42:09 +03:00
|
|
|
|
|
|
|
image_pull_secrets:
|
|
|
|
- DOCKER_AUTH
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: mkdocs_cache
|
|
|
|
host:
|
|
|
|
path: /drone/volume/mkdocs_cache/gitlab_notification
|
|
|
|
---
|
2023-01-15 16:46:32 +03:00
|
|
|
kind: signature
|
2023-02-26 14:27:01 +03:00
|
|
|
hmac: 9e69b7ad31ecf7855e6c8509eb81905a134d172451c5214ce46f9678bd16d2ab
|
2023-01-15 16:46:32 +03:00
|
|
|
|
|
|
|
...
|