From 8d0acf7081e1bf4ba9e2886f5b0e8570a7b337a2 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Mon, 8 Jul 2024 23:24:41 -0700 Subject: [PATCH] New approach - git clone directly --- .drone.yml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index 47d1b61..eef6bb0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,31 +39,17 @@ steps: platforms: - linux/arm64 - linux/amd64 - # Because `drone/git` does not support checking out to a specified directory - # (https://github.com/drone/drone-git/blob/master/posix/clone-commit), we have to remove the current contents of the - # directory before cloning the Helm Chart repo or there will be a clash. - # - # ...God, I really need to transition off of Drone and onto a better CI tool... - - name: Clear directory - image: alpine - commands: - - find . -not -path '.' - - find . -not -path '.' | xargs rm -rf - # Log out to check - - find . -not -path '.' - - - name: Checkout Helm Chart - image: drone/git - settings: - remote: gitea.scubbo.org/scubbo/helm-charts - ref: refs/heads/main - name: Update Helm Chart image: alpine commands: - - ls - - find + # Cannot use `drone/git` plugin because: + # * it cannot check out to a different directory + # * if you try to clear the main directory and use it to checkout, Drone will just re-clone the original repo + # between steps + # ...God, I really need to transition off of Drone and onto a better CI tool... - apk add yq git + - git clone gitea.scubbo.org/scubbo/helm-charts - cd helm-charts - yq -i '.image.tag = "${DRONE_COMMIT_SHA:0:10}"' charts/edh-elo/values.yaml - git add -A