Add Drone steps to update argo and purge cache

This commit is contained in:
Jack Jackson 2024-07-31 20:53:22 -07:00
parent 5d71f422f3
commit 2ba4cf9a30

View File

@ -63,4 +63,20 @@ steps:
- git add -A
- git -c user.name="Imagebot" -c user.email="fake@scubbo.org" commit -m 'Update EDH ELO commit to "${DRONE_COMMIT_SHA:0:10}"'
- git remote add origin-with-credentials "https://scubbo:$GITEA_PAT@gitea.scubbo.org/scubbo/helm-charts.git"
- git push origin-with-credentials main:main
- git push origin-with-credentials main:main
- name: update-argo
image: curlimages/curl
environment:
ARGO_TOKEN:
from_secret: argo_token
commands:
- "curl -sS -X POST \"argo-cd-argocd-server.argo.svc.cluster.local/api/v1/applications/edh-elo/sync\" -H \"Authorization: Bearer ${ARGO_TOKEN}\" -H \"Content-Type: application/json\""
- name: purge-cache
image: curlimages/curl
environment:
CLOUDFLARE_TOKEN:
from_secret: cloudflare_token
commands:
- "curl -sS -X POST \"https://api.cloudflare.com/client/v4/zones/c86d55d225ed973d5da45239beac2f99/purge_cache\" -H \"Authorization: Bearer ${CLOUDFLARE_TOKEN}\" -H \"Content-Type:application/json\" -d '{\"files\":[\"https://edh-elo.scubbo.org/*\"]}'"