From d0a3e0b7b0bea356778b4674c9a6e0a8e199c3a0 Mon Sep 17 00:00:00 2001 From: "Ruberoid (ghostcat)" Date: Thu, 5 Dec 2024 20:12:04 +0400 Subject: [PATCH] test 001. kaniko build. --- .drone.yml | 140 ++++++----------------------------------------------- 1 file changed, 16 insertions(+), 124 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6d78152..3cfc2ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,149 +26,41 @@ steps: - cd flea - git submodule update --init --recursive - - name: nocr telegram listener build & push - image: plugins/docker - privileged: true + - name: kaniko nocr telegram listener build & push + image: plugins/kaniko settings: - repo: hub.musk.fun/k8s/nocr/telegram_listener registry: hub.musk.fun + repo: hub.musk.fun/k8s/nocr/telegram_listener + tags: tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"] context: ./flea/telegram-listener dockerfile: ./flea/telegram-listener/src/Nocr.TelegramListener.Host/Dockerfile - tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"] username: from_secret: hub_username password: from_secret: hub_password - # depends_on: - # - clone - - - name: nocr telegram listener nuget package make & push - image: mcr.microsoft.com/dotnet/sdk:8.0 volumes: - - name: dotnet-cache - path: /app/ - 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 ./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 - # depends_on: - # - nocr telegram listener build & push + - name: kaniko-cache + # path: / + depends_on: + - clone - - name: nocr text matcher build & push - image: plugins/docker - privileged: true + - name: kaniko nocr text matcher build & push + image: plugins/kaniko settings: - repo: hub.musk.fun/k8s/nocr/text_matcher 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 - 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 - image: mcr.microsoft.com/dotnet/sdk:8.0 volumes: - - name: dotnet-cache - path: /app/ - 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 ./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 - # depends_on: - # - nocr text matcher 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 - image: mcr.microsoft.com/dotnet/sdk:8.0 - volumes: - - name: dotnet-cache - path: /app/ - 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 ./flea/users/Nocr.Users.sln -o ./flea/users/bin - - dotnet nuget push ./flea/users/bin/*Contract*.nupkg --api-key $NUGETAPIKEY --source musk --skip-duplicate - # depends_on: - # - 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_password - # 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 + - name: kaniko-cache + # path: / + depends_on: + - clone volumes: - name: dotnet-cache