From 5c4d6a6e83b16336822b6f45695bba7fc326ebe4 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 17:05:29 -0700 Subject: [PATCH 01/10] Upgrade Drone build file format from 0.8 to 1.x. --- .drone.yml | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5f94096..64e9132 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,19 +1,23 @@ -pipeline: - build: - image: python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} - pull: true - commands: - - python -m pip install --upgrade pip==19.1.1 - - pip install tox==3.10.0 - - tox - - apk add --no-cache borgbackup - - tox -e end-to-end +local Pipeline(python_version, alpine_version) = { + kind: "pipeline", + steps: [ + { + name: "build", + image: "python:" + python_version + "-alpine" + alpine_version, + pull: "always", + commands: [ + "python -m pip install --upgrade pip==19.1.1", + "pip install tox==3.10.0", + "tox", + "apk add --no-cache borgbackup", + "tox -e end-to-end" + ] + } + ] -matrix: - ALPINE_VERSION: - - 3.7 - - 3.9 - PYTHON_VERSION: - - 3.5 - - 3.6 - - 3.7 +[ + Pipeline("3.7", "3.7"), + Pipeline("3.5", "3.9"), + Pipeline("3.6", "3.9"), + Pipeline("3.7", "3.9"), +] From 071945e558572f6ce0ee9ccf2077cd9b0f3af264 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 17:15:01 -0700 Subject: [PATCH 02/10] Re-order. --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 64e9132..1695c11 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,8 +16,8 @@ local Pipeline(python_version, alpine_version) = { ] [ - Pipeline("3.7", "3.7"), Pipeline("3.5", "3.9"), Pipeline("3.6", "3.9"), Pipeline("3.7", "3.9"), + Pipeline("3.7", "3.7") ] From 31ae1013d787429da33a65195beb3ef7b8461535 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 17:18:30 -0700 Subject: [PATCH 03/10] Add missing close curly. --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 1695c11..1db011a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,7 @@ local Pipeline(python_version, alpine_version) = { ] } ] +}; [ Pipeline("3.5", "3.9"), From f5a70dc2a5f3dec5269aa5004bfa106aba7ebb0b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 17:30:07 -0700 Subject: [PATCH 04/10] Drone + jsonnet apparently requires an extension, so switching back to plain YAML. --- .drone.yml | 62 +++++++++++++++++++++++++++++------------------ scripts/run-tests | 14 +++++++++++ 2 files changed, 53 insertions(+), 23 deletions(-) create mode 100755 scripts/run-tests diff --git a/.drone.yml b/.drone.yml index 1db011a..50f6a1b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,24 +1,40 @@ -local Pipeline(python_version, alpine_version) = { - kind: "pipeline", - steps: [ - { - name: "build", - image: "python:" + python_version + "-alpine" + alpine_version, - pull: "always", - commands: [ - "python -m pip install --upgrade pip==19.1.1", - "pip install tox==3.10.0", - "tox", - "apk add --no-cache borgbackup", - "tox -e end-to-end" - ] - } - ] -}; +--- +kind: pipeline +name: python-3-5-alpine-3-9 -[ - Pipeline("3.5", "3.9"), - Pipeline("3.6", "3.9"), - Pipeline("3.7", "3.9"), - Pipeline("3.7", "3.7") -] +steps: +- name: build + image: python:3.5-alpine3.9 + pull: always + commands: + - scripts/run-tests +--- +kind: pipeline +name: python-3-6-alpine-3-9 + +steps: +- name: build + image: python:3.6-alpine3.9 + pull: always + commands: + - scripts/run-tests +--- +kind: pipeline +name: python-3-7-alpine-3-9 + +steps: +- name: build + image: python:3.7-alpine3.9 + pull: always + commands: + - scripts/run-tests +--- +kind: pipeline +name: python-3-7-alpine-3-7 + +steps: +- name: build + image: python:3.7-alpine3.7 + pull: always + commands: + - scripts/run-tests diff --git a/scripts/run-tests b/scripts/run-tests new file mode 100755 index 0000000..fb9039f --- /dev/null +++ b/scripts/run-tests @@ -0,0 +1,14 @@ +#!/bin/bash + +# This script is intended to be run from the continuous integration build +# server, and not on a developer machine. For that, see: +# https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/ + +set -e + +python -m pip install --upgrade pip==19.1.1 +pip install tox==3.10.0 +tox +apk add --no-cache borgbackup +tox -e end-to-end + From 53967f6324397e9466f2b7c9cdb718e3f740f8d2 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 17:48:39 -0700 Subject: [PATCH 05/10] Trigger build. --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 340aeed..245129e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ .coverage .pytest_cache .tox -build -dist +build/ +dist/ From d47f1bff4ddb70db96f1aad49b6be8549fb8715a Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 18:17:25 -0700 Subject: [PATCH 06/10] Try to run script. --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 50f6a1b..f480cc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: image: python:3.5-alpine3.9 pull: always commands: - - scripts/run-tests + - ./scripts/run-tests --- kind: pipeline name: python-3-6-alpine-3-9 @@ -17,7 +17,7 @@ steps: image: python:3.6-alpine3.9 pull: always commands: - - scripts/run-tests + - ./scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-9 @@ -27,7 +27,7 @@ steps: image: python:3.7-alpine3.9 pull: always commands: - - scripts/run-tests + - ./scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-7 @@ -37,4 +37,4 @@ steps: image: python:3.7-alpine3.7 pull: always commands: - - scripts/run-tests + - ./scripts/run-tests From 079dd3fe4cef0ca3c742dfa06215f247f71e27d4 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 18:18:30 -0700 Subject: [PATCH 07/10] Another try. --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index f480cc4..f0a5940 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: image: python:3.5-alpine3.9 pull: always commands: - - ./scripts/run-tests + - bash scripts/run-tests --- kind: pipeline name: python-3-6-alpine-3-9 @@ -17,7 +17,7 @@ steps: image: python:3.6-alpine3.9 pull: always commands: - - ./scripts/run-tests + - bash scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-9 @@ -27,7 +27,7 @@ steps: image: python:3.7-alpine3.9 pull: always commands: - - ./scripts/run-tests + - bash scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-7 @@ -37,4 +37,4 @@ steps: image: python:3.7-alpine3.7 pull: always commands: - - ./scripts/run-tests + - bash scripts/run-tests From aad47d174161ca4a9a04c7ac195f5d4835a3d0e2 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 18:19:42 -0700 Subject: [PATCH 08/10] bash -> sh. --- .drone.yml | 8 ++++---- scripts/run-tests | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index f0a5940..1d6e205 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: image: python:3.5-alpine3.9 pull: always commands: - - bash scripts/run-tests + - sh scripts/run-tests --- kind: pipeline name: python-3-6-alpine-3-9 @@ -17,7 +17,7 @@ steps: image: python:3.6-alpine3.9 pull: always commands: - - bash scripts/run-tests + - sh scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-9 @@ -27,7 +27,7 @@ steps: image: python:3.7-alpine3.9 pull: always commands: - - bash scripts/run-tests + - sh scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-7 @@ -37,4 +37,4 @@ steps: image: python:3.7-alpine3.7 pull: always commands: - - bash scripts/run-tests + - sh scripts/run-tests diff --git a/scripts/run-tests b/scripts/run-tests index fb9039f..fbe669e 100755 --- a/scripts/run-tests +++ b/scripts/run-tests @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # This script is intended to be run from the continuous integration build # server, and not on a developer machine. For that, see: From 61f46c5ad5693a1f8254d788691036bfc67d334a Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 19:06:13 -0700 Subject: [PATCH 09/10] Try without explicit "sh". --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1d6e205..50f6a1b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: image: python:3.5-alpine3.9 pull: always commands: - - sh scripts/run-tests + - scripts/run-tests --- kind: pipeline name: python-3-6-alpine-3-9 @@ -17,7 +17,7 @@ steps: image: python:3.6-alpine3.9 pull: always commands: - - sh scripts/run-tests + - scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-9 @@ -27,7 +27,7 @@ steps: image: python:3.7-alpine3.9 pull: always commands: - - sh scripts/run-tests + - scripts/run-tests --- kind: pipeline name: python-3-7-alpine-3-7 @@ -37,4 +37,4 @@ steps: image: python:3.7-alpine3.7 pull: always commands: - - sh scripts/run-tests + - scripts/run-tests From 3eadd16856dd5761972977bb346f0c6b2677fb60 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 20 May 2019 19:20:05 -0700 Subject: [PATCH 10/10] Add build server upgrade to NEWS. --- NEWS | 1 + scripts/run-tests | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3445842..300250e 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ * Remove Python cache files before each Tox run. * Add #borgmatic Freenode IRC channel to documentation. * Add Borg/borgmatic hosting providers section to documentation. + * Upgrade project build server from Drone 0.8 to 1.1. 1.3.5 * #153: Support for various Borg directory environment variables (BORG_CONFIG_DIR, BORG_CACHE_DIR, diff --git a/scripts/run-tests b/scripts/run-tests index fbe669e..62f9862 100755 --- a/scripts/run-tests +++ b/scripts/run-tests @@ -11,4 +11,3 @@ pip install tox==3.10.0 tox apk add --no-cache borgbackup tox -e end-to-end -