From 2ba4cf9a30ba98709ac8951788dd22d1063da5a7 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Wed, 31 Jul 2024 20:53:22 -0700 Subject: [PATCH] Add Drone steps to update argo and purge cache --- .drone.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 01d52a9..fe406b0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 \ No newline at end of file + - 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/*\"]}'"