From 29ef031d217d23a91b22d6f4766fbbaad575e05c Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Thu, 18 May 2023 21:13:38 -0700 Subject: [PATCH] testing a step to sync argocd --- .drone.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 48638e5e..a1b40076 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,7 +5,6 @@ name: default steps: - name: lint-python image: python:3.10-slim - environment: commands: - pip install -U -q black - black --fast --check . @@ -34,3 +33,21 @@ steps: - master event: - push + + +- name: sync_argo + # stage: .post + image: python:alpine + environment: + ARGOCD_TOKEN: + from_secret: ARGOCD_TOKEN + script: + - apk add --no-cache jq curl + - latest=$(curl -sL https://api.github.com/repos/argoproj/argo-cd/releases/latest | jq -r '.assets[] | select( .name | contains("argocd-linux-amd64")).browser_download_url') + - curl -Ls $latest -o /tmp/argocd && chmod +x /tmp/argocd + - /tmp/argocd --insecure --server argocd-server.argocd.svc.cluster.local --auth-token $ARGOCD_TOKEN app set dragon-bot --helm-set image.tag=${DRONE_BUILD_NUMBER} + trigger: + branch: + - master + event: + - push