diff --git a/.drone.yml b/.drone.yml index 5a8a5efd..20813325 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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" diff --git a/stacks/drone/main.tf b/stacks/drone/main.tf index 522a0d15..3d178edd 100644 --- a/stacks/drone/main.tf +++ b/stacks/drone/main.tf @@ -321,10 +321,6 @@ resource "kubernetes_deployment" "drone_runner" { name = "DRONE_DEBUG" value = "true" } - env { - name = "DRONE_IMAGE_CLONE" - value = "alpine/git:latest" - } } } }