pipeline { agent { kubernetes { yaml """ apiVersion: v1 kind: Pod spec: containers: - name: kaniko image: gcr.io/kaniko-project/executor:debug imagePullPolicy: Always command: - sleep args: - 1d volumeMounts: - name: kaniko-secret mountPath: /kaniko/.docker/config.json subPath: .dockerconfigjson volumes: - name: kaniko-secret secret: secretName: build-kubix-gitea-credentials """ } } stages { stage('Build and Push Image with Kaniko') { steps { container('kaniko') { sh '/kaniko/executor --dockerfile=./Dockerfile --context=dir://. --destination=gitea.kubix.siatel.ro/siatel/jenkins-agent:latest-bookworm-jdk17' } } } } }