fix: Remove additional_contexts and revert Kaniko changes

- Removed additional_contexts from docker-compose.yml (not supported by Kaniko)
- Reverted Kaniko image from v1.23.2 back to :debug
- Removed --build-context flags (not supported)
- Added prepare-build.sh script to copy nuget.config before builds
This commit is contained in:
ruberoid 2025-10-28 00:30:17 +04:00
parent 012d81bd66
commit 35bb116bfd
3 changed files with 22 additions and 24 deletions

View File

@ -424,7 +424,7 @@ steps:
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- name: telegram-listener-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -439,7 +439,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.TelegramListener.Host/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/telegram_listener:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/telegram_listener:${DRONE_TAG} \
@ -451,7 +450,7 @@ steps:
- users-nuget
- name: telegram-client-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -466,7 +465,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.TelegramClient.Host/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/telegram_client:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/telegram_client:${DRONE_TAG} \
@ -478,7 +476,7 @@ steps:
- telegram-listener-build-push
- name: text-matcher-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -493,7 +491,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.TextMatcher.Host/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/text_matcher:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/text_matcher:${DRONE_TAG} \
@ -505,7 +502,7 @@ steps:
- telegram-client-build-push
- name: text-matcher-migrator-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -520,7 +517,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.TextMatcher.Migrator/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/text_matcher_migrator:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/text_matcher_migrator:${DRONE_TAG} \
@ -532,7 +528,7 @@ steps:
- text-matcher-build-push
- name: users-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -547,7 +543,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.Users.Host/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/users:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/users:${DRONE_TAG} \
@ -559,7 +554,7 @@ steps:
- text-matcher-migrator-build-push
- name: users-migrator-build-push
image: gcr.io/kaniko-project/executor:v1.23.2-debug
image: gcr.io/kaniko-project/executor:debug
environment:
HUB_USERNAME:
from_secret: hub_username
@ -574,7 +569,6 @@ steps:
- |
/kaniko/executor \
--context=. \
--build-context=rootconfig=. \
--dockerfile=src/Nocr.Users.Migrator/Dockerfile \
--destination=hub.musk.fun/k8s/nocr/users_migrator:${DRONE_COMMIT_SHA:0:7} \
--destination=hub.musk.fun/k8s/nocr/users_migrator:${DRONE_TAG} \

View File

@ -5,8 +5,6 @@ services:
build:
context: telegram-client
dockerfile: src/Nocr.TelegramClient.Host/Dockerfile
additional_contexts:
rootconfig: .
ports:
- 5050:8080
# IMPORTANT: Create .nocr.env file in project root with your secrets
@ -31,8 +29,6 @@ services:
build:
context: telegram-listener
dockerfile: src/Nocr.TelegramListener.Host/Dockerfile
additional_contexts:
rootconfig: .
ports:
- 5040:8080
# IMPORTANT: Create .nocr.env file in project root with your secrets
@ -59,8 +55,6 @@ services:
build:
context: text-matcher
dockerfile: src/Nocr.TextMatcher.Host/Dockerfile
additional_contexts:
rootconfig: .
ports:
- 5041:8080
# IMPORTANT: Create .nocr.env file in project root with your secrets
@ -86,8 +80,6 @@ services:
build:
context: text-matcher
dockerfile: src/Nocr.TextMatcher.Migrator/Dockerfile
additional_contexts:
rootconfig: .
image: nocr-text-matcher-migrations:latest
container_name: nocr-text-matcher-migrator
environment:
@ -102,8 +94,6 @@ services:
build:
context: users
dockerfile: src/Nocr.Users.Host/Dockerfile
additional_contexts:
rootconfig: .
ports:
- 5042:8080
# IMPORTANT: Create .nocr.env file in project root with your secrets
@ -127,8 +117,6 @@ services:
build:
context: users
dockerfile: src/Nocr.Users.Migrator/Dockerfile
additional_contexts:
rootconfig: .
image: nocr-users-migrator:latest
container_name: nocr-users-migrator
environment:

16
prepare-build.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# Prepares the build environment by copying nuget.config to all submodules
# This is required for both local docker-compose builds and CI/CD
set -e
echo "📦 Copying nuget.config to all submodules..."
for submodule in telegram-client telegram-listener text-matcher users; do
if [ -d "$submodule" ]; then
cp nuget.config "$submodule/"
echo "✓ Copied to $submodule/"
fi
done
echo "✅ Build preparation complete!"