From 5cb36d7f342dbef149f1ebdcc3483f7f7d7caf91 Mon Sep 17 00:00:00 2001 From: lomion Date: Mon, 15 Mar 2021 16:07:39 +0100 Subject: [PATCH] Added support for woodpecker CI Because of historical reasons the pipeline file is still named drone.yaml (might be changed in future). --- create_release.sh | 2 +- drone.yaml | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/create_release.sh b/create_release.sh index 039cee7..3c22a90 100755 --- a/create_release.sh +++ b/create_release.sh @@ -1 +1 @@ -zip -r lomion.tmdb.mbp maubot.yaml tmdb/__init__.py tmdb/tmdb.py tmdb/tmdb_api.py tmdb/database.py +zip -r lomion.tmdb.$1.mbp maubot.yaml tmdb/__init__.py tmdb/tmdb.py tmdb/tmdb_api.py tmdb/database.py diff --git a/drone.yaml b/drone.yaml index fb9b252..d11417d 100644 --- a/drone.yaml +++ b/drone.yaml @@ -1,10 +1,18 @@ -kind: pipeline -type: docker -name: default +pipeline: + unittest: + image: python + commands: + - pip install -r requirements.txt + - python3 test_tmdb.py -steps: -- name: test - image: python - commands: - - pip install -r requirements.txt - - python3 test_tmdb.py + build: + image: alpine + commands: + - apk add zip + - ./create_release.sh ${DRONE_COMMIT_SHA:0:8} + - ls *.mbp + + upload: + image: uploader + project: tmdb-bot + artifact: lomion.tmdb.${DRONE_COMMIT_SHA:0:8}.mbp \ No newline at end of file