kind: pipeline type: docker name: Build and Push docker image steps: - name: Post pipeline start message to discord image: appleboy/drone-discord settings: username: Drone CI Bot webhook_id: from_secret: discord_webhook_id webhook_token: from_secret: discord_webhook_token avatar_url: https://miro.medium.com/v2/resize:fit:1358/0*AqO_2lNemh_Fl9Gm.png message: > šŸš€ Pipeline [[#{{build.number}}]({{build.link}})] of branch [{{commit.branch}}]({{commit.link}}) by ${DRONE_COMMIT_AUTHOR_NAME} has started trigger: branch: - master event: - push - name: lint-python image: python:3.10-slim commands: - pip install -U -q black - black --fast --check . trigger: event: - push - name: docker-build image: plugins/docker settings: username: ldooks password: from_secret: docker_token repo: ldooks/dragon-bot platform: linux/amd64 purge: false tags: - latest - ${DRONE_BUILD_NUMBER} trigger: branch: - master event: - push - name: sync_argo image: python:alpine environment: ARGOCD_TOKEN: from_secret: ARGOCD_TOKEN commands: - 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 192.168.1.205 --auth-token $ARGOCD_TOKEN app set dragon-bot --helm-set image.tag=${DRONE_BUILD_NUMBER} trigger: branch: - master event: - push - name: Post pipeline finished status to discord image: appleboy/drone-discord settings: username: Drone CI Bot webhook_id: from_secret: discord_webhook_id webhook_token: from_secret: discord_webhook_token avatar_url: https://miro.medium.com/v2/resize:fit:1358/0*AqO_2lNemh_Fl9Gm.png message: "{{#success build.status}}āœ…{{else}}āŒ{{/success}} Repository `[{{repo.name}}/{{commit.branch}}]` triggered by event `[{{uppercase build.event}}]` for build.\n - Commit [[{{commit.sha}}]({{commit.link}})]\n - Author `[{{commit.author}} / {{commit.email}}]`\n - Message: {{commit.message}} - Drone build [[#{{build.number}}]({{build.link}})] reported `[{{uppercase build.status}}]` at `[{{datetime build.finished \"2006.01.02 15:04\" \"\"}}]`\n​" trigger: branch: - master event: - push