added migrator images.
This commit is contained in:
parent
f89bc513af
commit
93154ac0fc
186
.drone.yml
186
.drone.yml
@ -7,91 +7,119 @@ clone:
|
|||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
settings:
|
settings:
|
||||||
tags: true
|
tags: true
|
||||||
commands:
|
commands:
|
||||||
- pwd
|
- pwd
|
||||||
- git clone https://gitea.musk.fun/nocr/local-env
|
- git clone https://gitea.musk.fun/nocr/local-env
|
||||||
- cd local-env
|
- cd local-env
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: nocr telegram listener build & push
|
- name: nocr telegram listener build & push
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
repo: hub.musk.fun/k8s/nocr/telegram_listener
|
repo: hub.musk.fun/k8s/nocr/telegram_listener
|
||||||
registry: hub.musk.fun
|
registry: hub.musk.fun
|
||||||
context: ./local-env/telegram-listener
|
context: ./local-env/telegram-listener
|
||||||
dockerfile: ./local-env/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
|
dockerfile: ./local-env/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
username:
|
username:
|
||||||
from_secret: hub_username
|
from_secret: hub_username
|
||||||
password:
|
password:
|
||||||
from_secret: hub_password
|
from_secret: hub_password
|
||||||
|
|
||||||
- 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
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
NUGETAPIKEY:
|
NUGETAPIKEY:
|
||||||
from_secret: nuget_musk_api_key
|
from_secret: nuget_musk_api_key
|
||||||
commands:
|
commands:
|
||||||
- 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 ./local-env/telegram-listener/Nocr.TelegramListener.sln -o ./local-env/telegram-listener/bin
|
- 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
|
- dotnet nuget push ./local-env/telegram-listener/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
||||||
|
|
||||||
- name: nocr text matcher build & push
|
- name: nocr text matcher build & push
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
repo: hub.musk.fun/k8s/nocr/text_matcher
|
repo: hub.musk.fun/k8s/nocr/text_matcher
|
||||||
registry: hub.musk.fun
|
registry: hub.musk.fun
|
||||||
context: ./local-env/text-matcher
|
context: ./local-env/text-matcher
|
||||||
dockerfile: ./local-env/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
|
dockerfile: ./local-env/text-matcher/src/Nocr.TextMatcher.Host/Dockerfile
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
username:
|
username:
|
||||||
from_secret: hub_username
|
from_secret: hub_username
|
||||||
password:
|
password:
|
||||||
from_secret: hub_password
|
from_secret: hub_password
|
||||||
|
|
||||||
- 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
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
NUGETAPIKEY:
|
NUGETAPIKEY:
|
||||||
from_secret: nuget_musk_api_key
|
from_secret: nuget_musk_api_key
|
||||||
commands:
|
commands:
|
||||||
- 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 ./local-env/text-matcher/Nocr.TextMatcher.sln -o ./local-env/text-matcher/bin
|
- 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
|
- dotnet nuget push ./local-env/text-matcher/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate
|
||||||
|
|
||||||
- name: nocr users build & push
|
- name: nocr users build & push
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
repo: hub.musk.fun/k8s/nocr/users
|
repo: hub.musk.fun/k8s/nocr/users
|
||||||
registry: hub.musk.fun
|
registry: hub.musk.fun
|
||||||
context: ./local-env/users
|
context: ./local-env/users
|
||||||
dockerfile: ./local-env/users/src/Nocr.Users.Host/Dockerfile
|
dockerfile: ./local-env/users/src/Nocr.Users.Host/Dockerfile
|
||||||
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
||||||
username:
|
username:
|
||||||
from_secret: hub_username
|
from_secret: hub_username
|
||||||
password:
|
password:
|
||||||
from_secret: hub_password
|
from_secret: hub_password
|
||||||
|
|
||||||
- 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
|
||||||
environment:
|
environment:
|
||||||
VERSION: ${DRONE_TAG}
|
VERSION: ${DRONE_TAG}
|
||||||
NUGETAPIKEY:
|
NUGETAPIKEY:
|
||||||
from_secret: nuget_musk_api_key
|
from_secret: nuget_musk_api_key
|
||||||
commands:
|
commands:
|
||||||
- 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 ./local-env/users/Nocr.Users.sln -o ./local-env/users/bin
|
- 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
|
- 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:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|||||||
@ -64,7 +64,8 @@ helm repo update
|
|||||||
#
|
#
|
||||||
# note that you should create a values.yaml file with db credentials at least.
|
# 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
|
# 05. Main deployment
|
||||||
|
|||||||
@ -132,7 +132,7 @@ spec:
|
|||||||
- name: RebusRabbitMqOptions__ConnectionString
|
- name: RebusRabbitMqOptions__ConnectionString
|
||||||
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
||||||
- name: mariadb_host
|
- name: mariadb_host
|
||||||
value: nocr-mariadb.nocr.svc
|
value: nocr-mdb-mariadb.nocr.svc
|
||||||
- name: mariadb_database
|
- name: mariadb_database
|
||||||
value: nocr_text_matcher
|
value: nocr_text_matcher
|
||||||
- name: mariadb_user
|
- name: mariadb_user
|
||||||
@ -140,7 +140,7 @@ spec:
|
|||||||
- name: mariadb_password
|
- name: mariadb_password
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nocr-mariadb
|
name: nocr-mdb-mariadb
|
||||||
key: mariadb-root-password
|
key: mariadb-root-password
|
||||||
- name: ConnectionStrings__TextMatcherContext
|
- name: ConnectionStrings__TextMatcherContext
|
||||||
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
|
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
2
users
@ -1 +1 @@
|
|||||||
Subproject commit 5cef1dcb4cad82e43bf3b8a47693a2ca1b07acdb
|
Subproject commit 0f0fb22b4fd5b84240b76d619f58f5fdacc72ceb
|
||||||
Loading…
Reference in New Issue
Block a user