New approach - git clone directly
This commit is contained in:
parent
c2541afff6
commit
8d0acf7081
26
.drone.yml
26
.drone.yml
@ -39,31 +39,17 @@ steps:
|
|||||||
platforms:
|
platforms:
|
||||||
- linux/arm64
|
- linux/arm64
|
||||||
- linux/amd64
|
- 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
|
- name: Update Helm Chart
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- ls
|
# Cannot use `drone/git` plugin because:
|
||||||
- find
|
# * 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
|
- apk add yq git
|
||||||
|
- git clone gitea.scubbo.org/scubbo/helm-charts
|
||||||
- cd helm-charts
|
- cd helm-charts
|
||||||
- yq -i '.image.tag = "${DRONE_COMMIT_SHA:0:10}"' charts/edh-elo/values.yaml
|
- yq -i '.image.tag = "${DRONE_COMMIT_SHA:0:10}"' charts/edh-elo/values.yaml
|
||||||
- git add -A
|
- git add -A
|
||||||
|
Loading…
x
Reference in New Issue
Block a user