From 54139d6f769297c3d5e939d0273bdb6f3007f784 Mon Sep 17 00:00:00 2001 From: Lulzette Date: Sun, 31 Oct 2021 02:24:54 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D1=81=D1=82=D1=83=D1=8E=20=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=80=D0=B8=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index c09a7c4..4690a59 100755 --- a/main.py +++ b/main.py @@ -104,6 +104,16 @@ class Back(): return bool(posts.delete_one({'name': name}).deleted_count) +class Metrics: + def alive(): + return str("alive 1") + + +@route('/metrics') +def metrics(): + return Metrics.alive() + + @route('/post/') def post(name): ''' From 49f981708a6952abe3b3934f65c81a9d82dfe54b Mon Sep 17 00:00:00 2001 From: Lulzette Date: Mon, 1 Nov 2021 04:28:02 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D1=88=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 152fa71..cc11049 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,18 +1,29 @@ kind: pipeline type: exec -name: default - -platform: - os: linux - arch: amd64 +name: build steps: - name: build commands: - docker-compose -p pycms build + +--- +kind: pipeline +type: exec +name: test +steps: - name: test commands: - docker-compose -p pycms up --build --abort-on-container-exit + +--- +kind: pipeline +type: exec +name: run and push +steps: + - name: push + commands: + - docker-compose -p pycms push - name: run commands: - docker-compose -p pycms up -d From 74cd6c6d4b66c143b3d68af17f3124077e9d3240 Mon Sep 17 00:00:00 2001 From: Lulzette Date: Mon, 1 Nov 2021 04:30:27 +0300 Subject: [PATCH 3/5] =?UTF-8?q?Revert=20"=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BF=D1=80=D0=BE=D1=81=D1=82=D1=83=D1=8E=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D1=80=D0=B8=D0=BA=D1=83"=20=D0=A2=D1=83?= =?UTF-8?q?=D1=82=20=D1=8D=D1=82=D0=BE=D0=B3=D0=BE=20=D0=B1=D1=8B=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BD=D0=B5=20=D0=B4=D0=BE=D0=BB=D0=B6=D0=BD=D0=BE=20?= =?UTF-8?q?0=5F0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 54139d6f769297c3d5e939d0273bdb6f3007f784. --- main.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/main.py b/main.py index 4690a59..c09a7c4 100755 --- a/main.py +++ b/main.py @@ -104,16 +104,6 @@ class Back(): return bool(posts.delete_one({'name': name}).deleted_count) -class Metrics: - def alive(): - return str("alive 1") - - -@route('/metrics') -def metrics(): - return Metrics.alive() - - @route('/post/') def post(name): ''' From f84994999a3e7f4436aacda34ecb496cfc0210da Mon Sep 17 00:00:00 2001 From: Lulzette Date: Mon, 1 Nov 2021 04:36:41 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BE=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D1=83=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BA=D1=83=D1=89=D0=B8=D1=85=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D0=B9=D0=BD=D0=B5=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index cc11049..b2b8e03 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,7 @@ steps: - docker-compose -p pycms push - name: run commands: + - docker-compose -p pycms down - docker-compose -p pycms up -d From 4f736f763e2994b6b7a11a51c52ffa04a686e579 Mon Sep 17 00:00:00 2001 From: Lulzette Date: Mon, 1 Nov 2021 04:38:54 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=9D=D0=B5=D1=82,=20=D0=BD=D0=B0=D0=B4?= =?UTF-8?q?=D0=BE=20=D0=B2=D0=BE=D1=82=20=D1=82=D0=B0=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index b2b8e03..c871d61 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,20 +7,10 @@ steps: commands: - docker-compose -p pycms build ---- -kind: pipeline -type: exec -name: test -steps: - name: test commands: - docker-compose -p pycms up --build --abort-on-container-exit ---- -kind: pipeline -type: exec -name: run and push -steps: - name: push commands: - docker-compose -p pycms push