From 417837da00326b0cd050dd560b2f73fd5340dae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 4 Oct 2023 19:58:07 +0200 Subject: [PATCH] MOAR FIXES --- .drone.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0092e49..63fb371 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,17 +11,20 @@ steps: - poetry install - poetry env info - poetry run pytest -- name: build container (prod) + +- name: build-prod image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker tags: - latest + depends_on: + - "test" when: branch: - main -- name: build container (non-prod) +- name: build-non-prod image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker @@ -32,16 +35,18 @@ steps: branch: exclude: - main + depends_on: + - "test" - name: redeploy on portainer image: plugins/webhook - settings: - urls: [ https://portainer.kucharczyk.xyz/api/webhooks/$ID ] - depends_on: - - "build container (non-prod)" environment: - ID: + WEBHOOK_ID: from_secret: PORTAINER_TIMETRACKER_WEBHOOK_ID + settings: + urls: [ https://portainer.kucharczyk.xyz/api/webhooks/$WEBHOOK_ID ] + depends_on: + - "build-prod"