Use manual clone with alpine instead of drone/git (pull-through cache issue)

This commit is contained in:
Viktor Barzin 2026-02-22 18:05:53 +00:00
parent 8df72b545c
commit 45f4459dbc
2 changed files with 16 additions and 4 deletions

View file

@ -3,6 +3,8 @@ type: kubernetes
name: default
concurrency:
limit: 1
clone:
disable: true
trigger:
event:
- push
@ -12,6 +14,8 @@ steps:
image: alpine
commands:
- "apk update && apk add jq curl git git-crypt"
- "git clone https://github.com/ViktorBarzin/infra.git ."
- "git checkout $DRONE_COMMIT"
- |
curl -k https://10.0.20.100:6443/api/v1/namespaces/drone/configmaps/git-crypt-key -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | jq -r .data.key | base64 -d > /tmp/key
- "git-crypt unlock /tmp/key"
@ -53,12 +57,20 @@ type: kubernetes
name: build-cli
concurrency:
limit: 1
clone:
disable: true
trigger:
event:
include:
- push
steps:
- name: Clone
image: alpine
commands:
- "apk update && apk add git"
- "git clone https://github.com/ViktorBarzin/infra.git ."
- "git checkout $DRONE_COMMIT"
- name: Build image
image: plugins/docker
settings:
@ -74,6 +86,8 @@ steps:
kind: pipeline
type: kubernetes
name: renew-tls-certificate
clone:
disable: true
trigger:
event:
- cron
@ -85,6 +99,8 @@ steps:
image: alpine
commands:
- "apk update && apk add jq curl git git-crypt"
- "git clone https://github.com/ViktorBarzin/infra.git ."
- "git checkout $DRONE_COMMIT"
- |
curl -k https://10.0.20.100:6443/api/v1/namespaces/drone/configmaps/git-crypt-key -H "Authorization:Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | jq -r .data.key | base64 -d > /tmp/key
- "git-crypt unlock /tmp/key"

View file

@ -321,10 +321,6 @@ resource "kubernetes_deployment" "drone_runner" {
name = "DRONE_DEBUG"
value = "true"
}
env {
name = "DRONE_IMAGE_CLONE"
value = "alpine/git:latest"
}
}
}
}