Use kaniko plugin instead of manual commands
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-02-14 16:19:19 +00:00
parent 0af78e658c
commit a71145f5eb

View File

@@ -4,16 +4,17 @@ when:
steps: steps:
- name: build-and-push - name: build-and-push
image: gcr.io/kaniko-project/executor:debug image: woodpeckerci/plugin-kaniko
environment: settings:
DOCKER_USERNAME: registry: git.mikhailkilin.ru
repo: git.mikhailkilin.ru/killingdruid/bcard
tags: "${CI_COMMIT_SHA:0:8},latest"
username:
from_secret: docker_username from_secret: docker_username
DOCKER_PASSWORD: password:
from_secret: docker_password from_secret: docker_password
commands: insecure: true
- mkdir -p /kaniko/.docker skip_tls_verify: true
- 'printf ''{"auths":{"git.mikhailkilin.ru":{"username":"%s","password":"%s"}}}'' "$DOCKER_USERNAME" "$DOCKER_PASSWORD" > /kaniko/.docker/config.json'
- '/kaniko/executor --context=. --destination=git.mikhailkilin.ru/killingdruid/bcard:${CI_COMMIT_SHA:0:8} --destination=git.mikhailkilin.ru/killingdruid/bcard:latest --insecure --skip-tls-verify'
- name: update-manifests - name: update-manifests
image: alpine image: alpine
@@ -23,7 +24,7 @@ steps:
DOCKER_PASSWORD: DOCKER_PASSWORD:
from_secret: docker_password from_secret: docker_password
commands: commands:
- apk add --no-cache git sed - apk add --no-cache git
- 'TAG=${CI_COMMIT_SHA:0:8}' - 'TAG=${CI_COMMIT_SHA:0:8}'
- 'sed -i "s|image:.*killingdruid/bcard:.*|image: git.mikhailkilin.ru/killingdruid/bcard:$TAG|" k8s/bcard.yaml' - 'sed -i "s|image:.*killingdruid/bcard:.*|image: git.mikhailkilin.ru/killingdruid/bcard:$TAG|" k8s/bcard.yaml'
- 'git config user.email "ci@mikhailkilin.ru"' - 'git config user.email "ci@mikhailkilin.ru"'