added migrator images.

This commit is contained in:
ruberoid 2024-04-14 14:12:56 +04:00
parent f89bc513af
commit 93154ac0fc
5 changed files with 113 additions and 84 deletions

View File

@ -7,91 +7,119 @@ clone:
disable: true
steps:
- name: clone
image: alpine/git
settings:
tags: true
commands:
- pwd
- git clone https://gitea.musk.fun/nocr/local-env
- cd local-env
- git submodule update --init --recursive
- name: clone
image: alpine/git
settings:
tags: true
commands:
- pwd
- git clone https://gitea.musk.fun/nocr/local-env
- cd local-env
- git submodule update --init --recursive
- name: nocr telegram listener build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/telegram_listener
registry: hub.musk.fun
context: ./local-env/telegram-listener
dockerfile: ./local-env/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr telegram listener build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/telegram_listener
registry: hub.musk.fun
context: ./local-env/telegram-listener
dockerfile: ./local-env/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr telegram listener nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/telegram-listener/Nocr.TelegramListener.sln -o ./local-env/telegram-listener/bin
- dotnet nuget push ./local-env/telegram-listener/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- name: nocr telegram listener nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/telegram-listener/Nocr.TelegramListener.sln -o ./local-env/telegram-listener/bin
- dotnet nuget push ./local-env/telegram-listener/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- 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: ./local-env/text-matcher
dockerfile: ./local-env/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- 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: ./local-env/text-matcher
dockerfile: ./local-env/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr text matcher nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/text-matcher/Nocr.TextMatcher.sln -o ./local-env/text-matcher/bin
- dotnet nuget push ./local-env/text-matcher/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- name: nocr text matcher nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/text-matcher/Nocr.TextMatcher.sln -o ./local-env/text-matcher/bin
- dotnet nuget push ./local-env/text-matcher/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- name: nocr users build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/users
registry: hub.musk.fun
context: ./local-env/users
dockerfile: ./local-env/users/src/Nocr.Users.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr users build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/users
registry: hub.musk.fun
context: ./local-env/users
dockerfile: ./local-env/users/src/Nocr.Users.Host/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr users nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/users/Nocr.Users.sln -o ./local-env/users/bin
- dotnet nuget push ./local-env/users/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- name: nocr users nuget package make & push
image: mcr.microsoft.com/dotnet/sdk:8.0
environment:
VERSION: ${DRONE_TAG}
NUGETAPIKEY:
from_secret: nuget_musk_api_key
commands:
- dotnet nuget add source --name musk https://gitea.musk.fun/api/packages/nocr/nuget/index.json
- dotnet pack ./local-env/users/Nocr.Users.sln -o ./local-env/users/bin
- dotnet nuget push ./local-env/users/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
- name: nocr text matcher migrator build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/text_matcher
registry: hub.musk.fun
context: ./local-env/text-matcher/src/Nocr.TextMatcher.Migrator
dockerfile: ./local-env/text-matcher/src/Nocr.TextMatcher.Migrator/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
- name: nocr users migrator build & push
image: plugins/docker
privileged: true
settings:
repo: hub.musk.fun/k8s/nocr/users
registry: hub.musk.fun
context: ./local-env/users/src/Migrator
dockerfile: ./local-env/users/src/Nocr.Users.Migrator/Dockerfile
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
username:
from_secret: hub_username
password:
from_secret: hub_password
trigger:
event:
- tag
- tag

View File

@ -64,7 +64,8 @@ helm repo update
#
# note that you should create a values.yaml file with db credentials at least.
#
helm install -f values.yaml nocr-mariadb bitnami/mariadb --namespace nocr
# helm install -f values.yaml nocr-maria-db bitnami/mariadb --namespace nocr
helm install nocr-mdb --set db.name=nocr_text_matcher,db.user=nocr_text_matcher_user stable/mariadb --namespace nocr
# 05. Main deployment

View File

@ -132,7 +132,7 @@ spec:
- name: RebusRabbitMqOptions__ConnectionString
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
- name: mariadb_host
value: nocr-mariadb.nocr.svc
value: nocr-mdb-mariadb.nocr.svc
- name: mariadb_database
value: nocr_text_matcher
- name: mariadb_user
@ -140,7 +140,7 @@ spec:
- name: mariadb_password
valueFrom:
secretKeyRef:
name: nocr-mariadb
name: nocr-mdb-mariadb
key: mariadb-root-password
- name: ConnectionStrings__TextMatcherContext
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"

@ -1 +1 @@
Subproject commit 246695350f46b7054681a305b41bc2dc3ad8ce2a
Subproject commit 1b08e0b33fbe37beb179fed715afa4b652435145

2
users

@ -1 +1 @@
Subproject commit 5cef1dcb4cad82e43bf3b8a47693a2ca1b07acdb
Subproject commit 0f0fb22b4fd5b84240b76d619f58f5fdacc72ceb