Merge branch 'main' of https://gitea.musk.fun/nocr/flea
This commit is contained in:
commit
79322cc9dc
239
.drone.yml
239
.drone.yml
@ -7,15 +7,21 @@ metadata:
|
|||||||
namespace: musk-drone
|
namespace: musk-drone
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
ref:
|
||||||
- main
|
- refs/heads/main
|
||||||
# event:
|
- refs/tags/*
|
||||||
# - tag
|
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: debug
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- printenv
|
||||||
|
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
settings:
|
settings:
|
||||||
@ -26,26 +32,131 @@ steps:
|
|||||||
- cd flea
|
- cd flea
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: nocr telegram listener build & push
|
- name: kaniko nocr telegram listener build & push
|
||||||
image: plugins/docker
|
image: plugins/kaniko
|
||||||
privileged: true
|
|
||||||
settings:
|
settings:
|
||||||
repo: hub.musk.fun/k8s/nocr/telegram_listener
|
|
||||||
registry: hub.musk.fun
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/telegram_listener
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
context: ./flea/telegram-listener
|
context: ./flea/telegram-listener
|
||||||
dockerfile: ./flea/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
|
dockerfile: ./flea/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
cache: true
|
||||||
username:
|
username:
|
||||||
from_secret: hub_username
|
from_secret: hub_username
|
||||||
password:
|
password:
|
||||||
from_secret: hub_password
|
from_secret: hub_password
|
||||||
depends_on:
|
# build_args:
|
||||||
- clone
|
# - --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - clone
|
||||||
|
|
||||||
|
- name: kaniko nocr text matcher build & push
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/text_matcher
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
|
context: ./flea/text-matcher
|
||||||
|
dockerfile: ./flea/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
build_args:
|
||||||
|
- --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - clone
|
||||||
|
|
||||||
|
- name: kaniko nocr users build & push
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/users
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
|
context: ./flea/users
|
||||||
|
dockerfile: ./flea/users/src/Nocr.Users.Host/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
build_args:
|
||||||
|
- --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - clone
|
||||||
|
|
||||||
|
- name: kaniko nocr telegram client build & push
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/telegram_client
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
|
context: ./flea/telegram-client
|
||||||
|
dockerfile: ./flea/telegram-client/src/Nocr.TelegramClient.Host/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
build_args:
|
||||||
|
- --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - clone
|
||||||
|
|
||||||
|
- name: kaniko nocr text matcher migrator build & push
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/text_matcher_migrator
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
|
context: ./flea/text-matcher/
|
||||||
|
dockerfile: ./flea/text-matcher/src/Nocr.TextMatcher.Migrator/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
build_args:
|
||||||
|
- --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - clone
|
||||||
|
|
||||||
|
- name: kaniko nocr users migrator build & push
|
||||||
|
image: plugins/kaniko
|
||||||
|
settings:
|
||||||
|
registry: hub.musk.fun
|
||||||
|
repo: hub.musk.fun/k8s/nocr/users_migrator
|
||||||
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
|
context: ./flea/users/
|
||||||
|
dockerfile: ./flea/users/src/Nocr.Users.Migrator/Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: hub_username
|
||||||
|
password:
|
||||||
|
from_secret: hub_password
|
||||||
|
build_args:
|
||||||
|
- --cache=true --cache-dir=/cache
|
||||||
|
volumes:
|
||||||
|
- name: local-cache
|
||||||
|
path: /cache
|
||||||
|
# depends_on:
|
||||||
|
# - kaniko nocr users build & push
|
||||||
|
|
||||||
- name: nocr telegram listener nuget package make & push
|
- name: nocr telegram listener nuget package make & push
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: dotnet-cache
|
- name: local-cache
|
||||||
path: /app/
|
path: /app/
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
@ -55,29 +166,13 @@ steps:
|
|||||||
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
||||||
- dotnet pack ./flea/telegram-listener/Nocr.TelegramListener.sln -o ./flea/telegram-listener/bin
|
- dotnet pack ./flea/telegram-listener/Nocr.TelegramListener.sln -o ./flea/telegram-listener/bin
|
||||||
- dotnet nuget push ./flea/telegram-listener/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
- dotnet nuget push ./flea/telegram-listener/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
||||||
depends_on:
|
# depends_on:
|
||||||
- nocr telegram listener build & push
|
# - kaniko nocr telegram listener build & push
|
||||||
|
|
||||||
- name: nocr text matcher build & push
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
repo: hub.musk.fun/k8s/nocr/text_matcher
|
|
||||||
registry: hub.musk.fun
|
|
||||||
context: ./flea/text-matcher
|
|
||||||
dockerfile: ./flea/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
|
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
||||||
username:
|
|
||||||
from_secret: hub_username
|
|
||||||
password:
|
|
||||||
from_secret: hub_password
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: nocr text matcher nuget package make & push
|
- name: nocr text matcher nuget package make & push
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: dotnet-cache
|
- name: local-cache
|
||||||
path: /app/
|
path: /app/
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
@ -87,29 +182,13 @@ steps:
|
|||||||
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
||||||
- dotnet pack ./flea/text-matcher/Nocr.TextMatcher.sln -o ./flea/text-matcher/bin
|
- dotnet pack ./flea/text-matcher/Nocr.TextMatcher.sln -o ./flea/text-matcher/bin
|
||||||
- dotnet nuget push ./flea/text-matcher/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
- dotnet nuget push ./flea/text-matcher/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
||||||
depends_on:
|
# depends_on:
|
||||||
- nocr text matcher build & push
|
# - kaniko nocr text matcher migrator build & push
|
||||||
|
|
||||||
- name: nocr users build & push
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
repo: hub.musk.fun/k8s/nocr/users
|
|
||||||
registry: hub.musk.fun
|
|
||||||
context: ./flea/users
|
|
||||||
dockerfile: ./flea/users/src/Nocr.Users.Host/Dockerfile
|
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
||||||
username:
|
|
||||||
from_secret: hub_username
|
|
||||||
password:
|
|
||||||
from_secret: hub_password
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: nocr users nuget package make & push
|
- name: nocr users nuget package make & push
|
||||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||||
volumes:
|
volumes:
|
||||||
- name: dotnet-cache
|
- name: local-cache
|
||||||
path: /app/
|
path: /app/
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
@ -119,62 +198,14 @@ steps:
|
|||||||
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
|
||||||
- dotnet pack ./flea/users/Nocr.Users.sln -o ./flea/users/bin
|
- dotnet pack ./flea/users/Nocr.Users.sln -o ./flea/users/bin
|
||||||
- dotnet nuget push ./flea/users/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
- dotnet nuget push ./flea/users/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
||||||
depends_on:
|
# depends_on:
|
||||||
- nocr users build & push
|
# - kaniko nocr users build & push
|
||||||
|
|
||||||
- name: nocr telegram client build & push
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
repo: hub.musk.fun/k8s/nocr/telegram_client
|
|
||||||
registry: hub.musk.fun
|
|
||||||
context: ./flea/telegram-client
|
|
||||||
dockerfile: ./flea/telegram-client/src/Nocr.TelegramClient.Host/Dockerfile
|
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
||||||
username:
|
|
||||||
from_secret: hub_username
|
|
||||||
password:
|
|
||||||
from_secret: hub_password
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
|
|
||||||
- name: nocr text matcher migrator build & push
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
repo: hub.musk.fun/k8s/nocr/text_matcher_migrator
|
|
||||||
registry: hub.musk.fun
|
|
||||||
context: ./flea/text-matcher/
|
|
||||||
dockerfile: ./flea/text-matcher/src/Nocr.TextMatcher.Migrator/Dockerfile
|
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
||||||
username:
|
|
||||||
from_secret: hub_username
|
|
||||||
password:
|
|
||||||
from_secret: hub_passwordi
|
|
||||||
depends_on:
|
|
||||||
- nocr text matcher build & push
|
|
||||||
|
|
||||||
- name: nocr users migrator build & push
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
repo: hub.musk.fun/k8s/nocr/users_migrator
|
|
||||||
registry: hub.musk.fun
|
|
||||||
context: ./flea/users/
|
|
||||||
dockerfile: ./flea/users/src/Nocr.Users.Migrator/Dockerfile
|
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
||||||
username:
|
|
||||||
from_secret: hub_username
|
|
||||||
password:
|
|
||||||
from_secret: hub_password
|
|
||||||
depends_on:
|
|
||||||
- nocr users build & push
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: dotnet-cache
|
- name: nfs-cache
|
||||||
claim:
|
claim:
|
||||||
name: dotnet-cache-claim
|
name: nfs-cache-claim
|
||||||
- name: kaniko-cache
|
- name: local-cache
|
||||||
claim:
|
claim:
|
||||||
name: kaniko-cache-claim
|
name: local-cache-claim
|
||||||
|
|
||||||
|
|||||||
14
README.md
14
README.md
@ -2,4 +2,18 @@
|
|||||||
|
|
||||||
Аккумуляция всех вложенных проектов.
|
Аккумуляция всех вложенных проектов.
|
||||||
|
|
||||||
|
[telegram-listener](https://gitea.musk.fun/nocr/telegram-listener)
|
||||||
|
Модуль, отвечающий за скан открытых каналов и чатов.
|
||||||
|
|
||||||
|
[telegram-client](https://gitea.musk.fun/nocr/telegram-client)
|
||||||
|
Модуль, отвечающий за клиентский интерфейс самого бота взаимодействия с пользователем.
|
||||||
|
|
||||||
|
[users](https://gitea.musk.fun/nocr/users)
|
||||||
|
Модуль, отвечающий за управление пользователями сервиса и их предпочтениями.
|
||||||
|
|
||||||
|
[text-matcher](https://gitea.musk.fun/nocr/text-matcher)
|
||||||
|
Модуль, отвечающий за сравнивание всего объема подписанных сообщений через listener по пересечению с пользовательскими интересами.
|
||||||
|
|
||||||
|
|
||||||
|
Статус сборки drone:
|
||||||
[](https://drone.musk.fun/nocr/flea)
|
[](https://drone.musk.fun/nocr/flea)
|
||||||
@ -79,6 +79,22 @@ spec:
|
|||||||
mountPath: /app/.secrets
|
mountPath: /app/.secrets
|
||||||
- name: rw-files
|
- name: rw-files
|
||||||
mountPath: /tmp/rw-files
|
mountPath: /tmp/rw-files
|
||||||
|
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: secrets
|
- name: secrets
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 04fff13fef788c81470d12726124d4738dedc117
|
Subproject commit 269826b70fdf8d1b09402eab40af60074ac74f0a
|
||||||
Loading…
Reference in New Issue
Block a user