From a0ca2e7e1e883b67d9c955537a2be08965e0d39a Mon Sep 17 00:00:00 2001 From: Sergey Bahmatov Date: Fri, 28 Mar 2025 19:30:05 +0500 Subject: [PATCH] fix pipeline --- .drone.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 27419da..f2203aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,11 +3,20 @@ type: docker name: default steps: - - name: build-and-push-kaniko - image: gcr.io/kaniko-project/executor:latest + - name: prepare docker config + image: alpine environment: DOCKER_CONFIG_JSON: from_secret: DOCKER_CONFIG_JSON + commands: + - mkdir -p /kaniko/.docker + - echo "$DOCKER_CONFIG_JSON" > /kaniko/.docker/config.json + volumes: + - name: kaniko-config + path: /kaniko/.docker + + - name: build-and-push-kaniko + image: gcr.io/kaniko-project/executor:latest command: - --dockerfile=Dockerfile - --context=. @@ -15,7 +24,9 @@ steps: - --cache=true - --cache-repo=git.iamninja.ru/iamninja/pomodoro_tg_bot/cache - --skip-tls-verify - + volumes: + - name: kaniko-config + path: /kaniko/.docker - name: deploy to server image: appleboy/drone-ssh @@ -44,3 +55,7 @@ steps: - docker login git.iamninja.ru -u "$DOCKER_USERNAME" -p "$CICD_TOKEN" - docker compose pull - docker compose up -d + +volumes: + - name: kaniko-config + temp: {}