From b8525399aa2636d9f78fced81051911efc140e6e Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Thu, 11 Feb 2021 19:52:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Try=20out=20Drone=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.star | 38 ++++++++++++++++++++++++++++++++++++++ .drone.yml | 45 --------------------------------------------- 2 files changed, 38 insertions(+), 45 deletions(-) create mode 100644 .drone.star delete mode 100644 .drone.yml diff --git a/.drone.star b/.drone.star new file mode 100644 index 0000000..402ed84 --- /dev/null +++ b/.drone.star @@ -0,0 +1,38 @@ +def main(ctx): + if ctx.build.event == "tag": + name = "release" + dry_run = False + auto_tag = True + elif ctx.build.branch == "master": + name = "master" + dry_run = True + auto_tag = False + else: + return + + return { + "kind": "pipeline", + "name": name, + "steps": [ + { + "name": "prepare data", + "image": "alpine", + "commands": [ + "apk update && apk add bash curl", + "FORCE_DOWNLOAD=y ./build-tmp-XXX" + ] + }, + { + "name": "build core", + "image": "plugins/docker", + "settings": { + "dry_run": dry_run, + "auto_tag": auto_tag, + "username": { "from_secret": "docker_username" }, + "password": { "from_secret": "docker_password" }, + "repo": "mikegerber/my_ocrd_workflow-core", + "dockerfile": "Dockerfile-core", + } + } + ] + } diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 46b3e27..0000000 --- a/.drone.yml +++ /dev/null @@ -1,45 +0,0 @@ -kind: pipeline -name: default - -steps: -- name: prepare data - image: alpine - commands: - - apk update && apk add bash curl - - FORCE_DOWNLOAD=y ./build-tmp-XXX -- name: build core - image: plugins/docker - settings: - dry_run: true - repo: mikegerber/my_ocrd_workflow-core - dockerfile: Dockerfile-core - -trigger: - branch: - - master - - ---- -kind: pipeline -name: release - -steps: -- name: prepare data - image: alpine - commands: - - apk update && apk add bash curl - - FORCE_DOWNLOAD=y ./build-tmp-XXX -- name: build core - image: plugins/docker - settings: - auto_tag: true - username: - from_secret: docker_username - password: - from_secret: docker_password - repo: mikegerber/my_ocrd_workflow-core - dockerfile: Dockerfile-core - -trigger: - event: - - tag