From 89c0510b24dd4382fde8f98f6f52935a1d680746 Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Fri, 28 Dec 2018 23:11:08 -0500 Subject: [PATCH 01/36] Add support for bunsenlabs debian derivative --- bootstrap-salt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7a84c15..720d886 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1431,7 +1431,7 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(cumulus_.+|devuan|kali|linuxmint|raspbian)" + DEBIAN_DERIVATIVES="(cumulus_.+|devuan|kali|linuxmint|raspbian|bunsenlabs)" # Mappings cumulus_2_debian_base="7.0" cumulus_3_debian_base="8.0" @@ -1441,6 +1441,7 @@ __debian_derivatives_translation() { linuxmint_1_debian_base="8.0" raspbian_8_debian_base="8.0" raspbian_9_debian_base="9.0" + bunsenlabs_9_debian_base="9.0" # Translate Debian derivatives to their base Debian version match=$(echo "$DISTRO_NAME_L" | grep -E ${DEBIAN_DERIVATIVES}) @@ -1467,6 +1468,10 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="raspbian" ;; + bunsenlabs) + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') + _debian_derivative="bunsenlabs" + ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base" 2>/dev/null) From 6da700581043e06c88d4b3173eac65ffd1207109 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 9 Jan 2019 14:05:27 +0000 Subject: [PATCH 02/36] Add the 2019.01.08 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 65c1a03..fa26ea1 100644 --- a/README.rst +++ b/README.rst @@ -28,6 +28,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2019.01.08: ``ab7f29b75711da4bb79aff98d46654f910d569ebe3e908753a3c5119017bb163`` - 2018.08.15: ``6d414a39439a7335af1b78203f9d37e11c972b3c49c519742c6405e2944c6c4b`` - 2018.08.13: ``98284bdc2b5ebaeb619b22090374e42a68e8fdefe6bff1e73bd1760db4407ed0`` - 2018.04.25: ``e2e3397d6642ba6462174b4723f1b30d04229b75efc099a553e15ea727877dfb`` From 08329780ef2a2dedc6bbd6411e5518d50c9cdb4c Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Tue, 15 Jan 2019 09:46:08 -0700 Subject: [PATCH 03/36] Adding .drone.yml --- .drone.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6e0be16 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +kind: pipeline +name: centos-7 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: docker:dind + privileged: true + environment: + PATH: $PATH:/usr/local/rbenv/plugins/ruby-build/bin:/usr/local/rbenv/bin:/usr/bin:/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin + From bd6f6c75694b38c775ecb8924e2f67861e7e00dc Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 23 Jan 2019 21:43:53 -0700 Subject: [PATCH 04/36] Adding drone as the builder --- .drone.yml | 95 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6e0be16..eda61cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,14 +1,87 @@ +# +# execute this file via: drone exec --privileged saltstack/drone-plugin-kitchen +# kind: pipeline -name: centos-7 - -platform: - os: linux - arch: amd64 +name: salt-bootstrap steps: -- name: build - image: docker:dind - privileged: true - environment: - PATH: $PATH:/usr/local/rbenv/plugins/ruby-build/bin:/usr/local/rbenv/bin:/usr/bin:/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin - +- name: build-all + image: alpine + commands: + - echo Giddy up!!! + depends_on: + - run-shellcheck + - build-centos6 + - build-centos7 + - build-amazon1 + - build-amazon2 + - build-debian8 + - build-debian9 + - build-fedora + - build-opensuse + - build-ubuntu1604 + - build-ubuntu1804 +- name: run-shellcheck + image: koalaman/shellcheck-alpine + commands: + - shellcheck -s sh -f checkstyle bootstrap-salt.sh +- name: build-centos6 + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: centos-6 + requirements: tests/requirements.txt +- name: build-centos7 + image: saltstack/drone-plugin-kitchen + settings: + target: centos-7 + requirements: tests/requirements.txt +- name: build-amazon1 + image: saltstack/drone-plugin-kitchen + settings: + target: amazon-1 + requirements: tests/requirements.txt +- name: build-amazon2 + image: saltstack/drone-plugin-kitchen + settings: + target: amazon-2 + requirements: tests/requirements.txt +- name: build-debian8 + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: debian-8 + requirements: tests/requirements.txt +- name: build-debian9 + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: debian-9 + requirements: tests/requirements.txt +- name: build-fedora + image: saltstack/drone-plugin-kitchen + settings: + target: fedora + requirements: tests/requirements.txt +- name: build-opensuse + image: saltstack/drone-plugin-kitchen + settings: + target: opensuse + requirements: tests/requirements.txt +- name: build-ubuntu1404 + image: saltstack/drone-plugin-kitchen + settings: + target: ubuntu-1404 + requirements: tests/requirements.txt +- name: build-ubuntu1604 + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: ubuntu-1604 + requirements: tests/requirements.txt +- name: build-ubuntu1804 + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: ubuntu-1804 + requirements: tests/requirements.txt From 3fc96a4315301bb4e0b099a96ca22463852833db Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 23 Jan 2019 21:47:42 -0700 Subject: [PATCH 05/36] Adding drone signature --- .drone.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.drone.yml b/.drone.yml index eda61cb..9ced546 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,4 @@ +--- # # execute this file via: drone exec --privileged saltstack/drone-plugin-kitchen # @@ -85,3 +86,8 @@ steps: settings: target: ubuntu-1804 requirements: tests/requirements.txt +--- +kind: signature +hmac: 04f23cb4ddf4e8223fb6c44bee2f043b73c93c983c397474b97db4deb6807701 + +... From ebac9b973cebba31535d9079de5b4f3f01050c31 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 23 Jan 2019 22:12:23 -0700 Subject: [PATCH 06/36] Adding conditional event --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 9ced546..f7b4c41 100644 --- a/.drone.yml +++ b/.drone.yml @@ -86,6 +86,9 @@ steps: settings: target: ubuntu-1804 requirements: tests/requirements.txt + when: + event: + - pull_request --- kind: signature hmac: 04f23cb4ddf4e8223fb6c44bee2f043b73c93c983c397474b97db4deb6807701 From 2fe0da3783eb87b633940f6bdf82b5dec94fce70 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 12:42:16 -0700 Subject: [PATCH 07/36] refactored the drone build file --- .drone.yml | 189 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 128 insertions(+), 61 deletions(-) diff --git a/.drone.yml b/.drone.yml index f7b4c41..433c6c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,96 +1,163 @@ --- -# -# execute this file via: drone exec --privileged saltstack/drone-plugin-kitchen -# kind: pipeline -name: salt-bootstrap +name: run-shellcheck steps: -- name: build-all - image: alpine - commands: - - echo Giddy up!!! - depends_on: - - run-shellcheck - - build-centos6 - - build-centos7 - - build-amazon1 - - build-amazon2 - - build-debian8 - - build-debian9 - - build-fedora - - build-opensuse - - build-ubuntu1604 - - build-ubuntu1804 -- name: run-shellcheck +- name: build image: koalaman/shellcheck-alpine commands: - shellcheck -s sh -f checkstyle bootstrap-salt.sh -- name: build-centos6 + +--- +kind: pipeline +name: build-centos6 + +steps: +- name: build image: saltstack/drone-plugin-kitchen failure: ignore settings: target: centos-6 requirements: tests/requirements.txt -- name: build-centos7 + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-centos7 + +steps: +- name: build image: saltstack/drone-plugin-kitchen + failure: ignore settings: target: centos-7 requirements: tests/requirements.txt -- name: build-amazon1 - image: saltstack/drone-plugin-kitchen - settings: - target: amazon-1 - requirements: tests/requirements.txt -- name: build-amazon2 - image: saltstack/drone-plugin-kitchen - settings: - target: amazon-2 - requirements: tests/requirements.txt -- name: build-debian8 + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-amazon1 + +steps: +- name: build image: saltstack/drone-plugin-kitchen failure: ignore settings: - target: debian-8 + target: amazon1 requirements: tests/requirements.txt -- name: build-debian9 + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-amazon2 + +steps: +- name: build image: saltstack/drone-plugin-kitchen failure: ignore settings: - target: debian-9 + target: amazon2 requirements: tests/requirements.txt -- name: build-fedora + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-debian8 + +steps: +- name: build image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: debian8 + requirements: tests/requirements.txt + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-debian9 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: debian9 + requirements: tests/requirements.txt + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-fedora + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + failure: ignore settings: target: fedora requirements: tests/requirements.txt -- name: build-opensuse + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-opensuse + +steps: +- name: build image: saltstack/drone-plugin-kitchen + failure: ignore settings: target: opensuse requirements: tests/requirements.txt -- name: build-ubuntu1404 - image: saltstack/drone-plugin-kitchen - settings: - target: ubuntu-1404 - requirements: tests/requirements.txt -- name: build-ubuntu1604 - image: saltstack/drone-plugin-kitchen - failure: ignore - settings: - target: ubuntu-1604 - requirements: tests/requirements.txt -- name: build-ubuntu1804 - image: saltstack/drone-plugin-kitchen - failure: ignore - settings: - target: ubuntu-1804 - requirements: tests/requirements.txt - when: - event: - - pull_request + +depends_on: +- run-shellcheck + --- -kind: signature -hmac: 04f23cb4ddf4e8223fb6c44bee2f043b73c93c983c397474b97db4deb6807701 +kind: pipeline +name: build-ubuntu1604 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: ubuntu1604 + requirements: tests/requirements.txt + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-ubuntu1804 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + failure: ignore + settings: + target: ubuntu1804 + requirements: tests/requirements.txt + +depends_on: +- run-shellcheck + + ... From d6d883b987d8143556bcfb27ff97859c269bfc76 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 12:43:43 -0700 Subject: [PATCH 08/36] Signing drone file --- .drone.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.drone.yml b/.drone.yml index 433c6c6..baf90e4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -160,4 +160,8 @@ depends_on: +--- +kind: signature +hmac: 32411e880077b35a310059229f194fd9a8e0fe7a10ec82d556e842d197349228 + ... From 3ada63f458dba515b67bfff37e3f8df75d5d0dc2 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 12:46:44 -0700 Subject: [PATCH 09/36] Adding event for PR --- .drone.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.drone.yml b/.drone.yml index baf90e4..613b43e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,9 @@ steps: image: koalaman/shellcheck-alpine commands: - shellcheck -s sh -f checkstyle bootstrap-salt.sh + when: + event: + - pull_request --- kind: pipeline @@ -19,6 +22,9 @@ steps: settings: target: centos-6 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -34,6 +40,9 @@ steps: settings: target: centos-7 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -49,6 +58,9 @@ steps: settings: target: amazon1 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -64,6 +76,9 @@ steps: settings: target: amazon2 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -79,6 +94,9 @@ steps: settings: target: debian8 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -94,6 +112,9 @@ steps: settings: target: debian9 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -109,6 +130,9 @@ steps: settings: target: fedora requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -124,6 +148,9 @@ steps: settings: target: opensuse requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -139,6 +166,9 @@ steps: settings: target: ubuntu1604 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck @@ -154,6 +184,9 @@ steps: settings: target: ubuntu1804 requirements: tests/requirements.txt + when: + event: + - pull_request depends_on: - run-shellcheck From a5d66a036e521928e77f01452296cbb781aa7305 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 13:36:25 -0700 Subject: [PATCH 10/36] Adding a few flags and moving my conditional --- .drone.yml | 64 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/.drone.yml b/.drone.yml index 613b43e..7f60e08 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,13 +18,14 @@ name: build-centos6 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: centos-6 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -36,13 +37,14 @@ name: build-centos7 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: centos-7 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -54,13 +56,14 @@ name: build-amazon1 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: amazon1 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -72,13 +75,14 @@ name: build-amazon2 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: amazon2 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -90,13 +94,14 @@ name: build-debian8 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: debian8 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -108,13 +113,14 @@ name: build-debian9 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: debian9 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -126,13 +132,14 @@ name: build-fedora steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: fedora requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -144,13 +151,14 @@ name: build-opensuse steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: opensuse requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -162,13 +170,14 @@ name: build-ubuntu1604 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: ubuntu1604 requirements: tests/requirements.txt - when: - event: - - pull_request + when: + event: + - pull_request depends_on: - run-shellcheck @@ -180,6 +189,7 @@ name: build-ubuntu1804 steps: - name: build image: saltstack/drone-plugin-kitchen + privileged: true failure: ignore settings: target: ubuntu1804 From 16f8b3fa4e50c64a6936ed19c7f0c75345a53a47 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 14:07:35 -0700 Subject: [PATCH 11/36] Fixing the kitchen platform names --- .drone.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7f60e08..63663c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,7 +38,6 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: target: centos-7 requirements: tests/requirements.txt @@ -57,9 +56,8 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: - target: amazon1 + target: amazon-1 requirements: tests/requirements.txt when: event: @@ -76,9 +74,8 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: - target: amazon2 + target: amazon-2 requirements: tests/requirements.txt when: event: @@ -97,7 +94,7 @@ steps: privileged: true failure: ignore settings: - target: debian8 + target: debian-8 requirements: tests/requirements.txt when: event: @@ -116,7 +113,7 @@ steps: privileged: true failure: ignore settings: - target: debian9 + target: debian-9 requirements: tests/requirements.txt when: event: @@ -133,7 +130,6 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: target: fedora requirements: tests/requirements.txt @@ -152,7 +148,6 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: target: opensuse requirements: tests/requirements.txt @@ -173,7 +168,7 @@ steps: privileged: true failure: ignore settings: - target: ubuntu1604 + target: ubuntu-16.04 requirements: tests/requirements.txt when: event: @@ -192,7 +187,7 @@ steps: privileged: true failure: ignore settings: - target: ubuntu1804 + target: ubuntu-18.04 requirements: tests/requirements.txt when: event: From 7b93136be17a3dc1f66a33c80278dddef966ed6d Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Thu, 24 Jan 2019 14:17:54 -0700 Subject: [PATCH 12/36] Updated the ubuntu platforms --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 63663c6..cd063b9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -168,7 +168,7 @@ steps: privileged: true failure: ignore settings: - target: ubuntu-16.04 + target: ubuntu-1604 requirements: tests/requirements.txt when: event: @@ -187,7 +187,7 @@ steps: privileged: true failure: ignore settings: - target: ubuntu-18.04 + target: ubuntu-1804 requirements: tests/requirements.txt when: event: From 9218a667789be8b63215332e247a4f34cf9feed5 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Mon, 28 Jan 2019 14:10:20 -0700 Subject: [PATCH 13/36] Adding changes for builds. --- .drone.yml | 2 -- .kitchen.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index cd063b9..d33edcb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -166,7 +166,6 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: target: ubuntu-1604 requirements: tests/requirements.txt @@ -185,7 +184,6 @@ steps: - name: build image: saltstack/drone-plugin-kitchen privileged: true - failure: ignore settings: target: ubuntu-1804 requirements: tests/requirements.txt diff --git a/.kitchen.yml b/.kitchen.yml index 886b4f1..f5d4a2c 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -118,4 +118,4 @@ suites: verifier: name: shell remote_exec: false - command: pytest -v tests/integration/ + command: pytest --cache-clear -v tests/integration/ From 115948f15434cf77b60ee19c1f752ec8e92d221c Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 10:29:57 -0700 Subject: [PATCH 14/36] adding Jsonnet file for Drone --- .drone.jsonnet | 51 +++++++ .drone.yml | 351 ++++++++++++++++++++++--------------------------- 2 files changed, 207 insertions(+), 195 deletions(-) create mode 100644 .drone.jsonnet diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..2230abf --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,51 @@ +local Build(os, os_version) = { + kind: 'pipeline', + name: 'build-' + os + '-' + os_version, + steps: [ + { + name: 'build', + image: 'saltstack/drone-plugin-kitchen', + privileged: true, + settings: { + target: os + '-' + os_version, + requirements: 'tests/requirements.txt', + }, + when: { event: ['pull_request'] }, + } + ], + depends_on: [ + 'run-shellcheck' + ], +}; + +local Shellcheck() = { +kind: 'pipeline', + name: 'run-shellcheck', + steps: [ + { + name: 'run-shellcheck', + image: 'koalaman/shellcheck-alpine', + commands: [ + 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', + ], + when: { event: ['pull_request'] } + } + ] +}; + +local distros = [ + { name: 'centos', version: '6' }, + { name: 'centos', version: '7' }, + { name: 'debian', version: '8' }, + { name: 'debian', version: '9' }, + { name: 'ubuntu', version: '1404' }, +# { name: 'ubuntu', version: '1604' }, + { name: 'ubuntu', version: '1804' }, +]; + +[ + Build(distro.name, distro.version) + for distro in distros +] + [ + Shellcheck() +] diff --git a/.drone.yml b/.drone.yml index d33edcb..44ad434 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,203 +1,164 @@ --- -kind: pipeline -name: run-shellcheck - -steps: -- name: build - image: koalaman/shellcheck-alpine - commands: - - shellcheck -s sh -f checkstyle bootstrap-salt.sh - when: - event: - - pull_request - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-centos-6", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "centos-6" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-centos6 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore - settings: - target: centos-6 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-centos-7", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "centos-7" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-centos7 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: centos-7 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-debian-8", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "debian-8" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-amazon1 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: amazon-1 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-debian-9", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "debian-9" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-amazon2 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: amazon-2 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-ubuntu-1404", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "ubuntu-1404" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-debian8 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore - settings: - target: debian-8 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-ubuntu-1804", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "ubuntu-1804" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-debian9 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore - settings: - target: debian-9 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-fedora - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: fedora - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-opensuse - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: opensuse - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-ubuntu1604 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: ubuntu-1604 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-ubuntu1804 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: ubuntu-1804 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - - - ---- -kind: signature -hmac: 32411e880077b35a310059229f194fd9a8e0fe7a10ec82d556e842d197349228 - +{ + "kind": "pipeline", + "name": "run-shellcheck", + "steps": [ + { + "commands": [ + "shellcheck -s sh -f checkstyle bootstrap-salt.sh" + ], + "image": "koalaman/shellcheck-alpine", + "name": "run-shellcheck", + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} ... From 1a3b45ba14082bf7f749c16002e917b275368742 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 10:32:17 -0700 Subject: [PATCH 15/36] Siging file --- .drone.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.drone.yml b/.drone.yml index 44ad434..886b670 100644 --- a/.drone.yml +++ b/.drone.yml @@ -161,4 +161,8 @@ } ] } +--- +kind: signature +hmac: 28ee922e7781842a8666344b4f7ebce3a5c0971db4f2a78c240548c45ff251d4 + ... From ea91aea017873286825adb643649cc29f76d4aca Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 10:39:42 -0700 Subject: [PATCH 16/36] Updated the conversion to use the Drone one --- .drone.yml | 300 +++++++++++++++++++++++++---------------------------- 1 file changed, 143 insertions(+), 157 deletions(-) diff --git a/.drone.yml b/.drone.yml index 886b670..6bb6b28 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,168 +1,154 @@ --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-centos-6", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "centos-6" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-centos-6 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: centos-6 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-centos-7", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "centos-7" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-centos-7 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: centos-7 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-debian-8", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "debian-8" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-debian-8 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: debian-8 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-debian-9", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "debian-9" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-debian-9 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: debian-9 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-ubuntu-1404", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "ubuntu-1404" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-ubuntu-1404 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: ubuntu-1404 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-ubuntu-1804", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "ubuntu-1804" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-ubuntu-1804 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: ubuntu-1804 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "kind": "pipeline", - "name": "run-shellcheck", - "steps": [ - { - "commands": [ - "shellcheck -s sh -f checkstyle bootstrap-salt.sh" - ], - "image": "koalaman/shellcheck-alpine", - "name": "run-shellcheck", - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: run-shellcheck + +platform: + os: linux + arch: amd64 + +steps: +- name: run-shellcheck + image: koalaman/shellcheck-alpine + commands: + - shellcheck -s sh -f checkstyle bootstrap-salt.sh + when: + event: + - pull_request + --- kind: signature -hmac: 28ee922e7781842a8666344b4f7ebce3a5c0971db4f2a78c240548c45ff251d4 +hmac: 3932ad0ad24dfbc51ac7367295fbd3c95288dc79bfb12246269965f9a9965ae4 ... From d78075718f7cd3c3801ba82978bbe5d547902ca9 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 10:40:31 -0700 Subject: [PATCH 17/36] fixed indent --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 2230abf..5659950 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -19,7 +19,7 @@ local Build(os, os_version) = { }; local Shellcheck() = { -kind: 'pipeline', + kind: 'pipeline', name: 'run-shellcheck', steps: [ { From d57db88640f8219b3ec7b0e80b8107f04ab4d7a8 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:05:41 -0700 Subject: [PATCH 18/36] Fixing Drone Yaml --- .drone.jsonnet | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 5659950..9c06c5d 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -10,12 +10,12 @@ local Build(os, os_version) = { target: os + '-' + os_version, requirements: 'tests/requirements.txt', }, - when: { event: ['pull_request'] }, - } - ], + when: { event: ['pull_request'] }, + }, + ], depends_on: [ 'run-shellcheck' - ], + ] }; local Shellcheck() = { @@ -28,7 +28,7 @@ local Shellcheck() = { commands: [ 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', ], - when: { event: ['pull_request'] } + when: { event: ['pull_request'] } } ] }; From 01a4136772cc3cef3cf02afa26417e84bfcb5f3e Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:14:44 -0700 Subject: [PATCH 19/36] reformatting --- .drone.yml | 300 ++++++++++++++++++++++++++++------------------------- 1 file changed, 157 insertions(+), 143 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6bb6b28..886b670 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,154 +1,168 @@ --- -kind: pipeline -name: build-centos-6 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: centos-6 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-centos-6", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "centos-6" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-centos-7 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: centos-7 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-centos-7", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "centos-7" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-debian-8 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: debian-8 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-debian-8", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "debian-8" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-debian-9 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: debian-9 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-debian-9", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "debian-9" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-ubuntu-1404 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: ubuntu-1404 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-ubuntu-1404", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "ubuntu-1404" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: build-ubuntu-1804 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: ubuntu-1804 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - +{ + "depends_on": [ + "run-shellcheck" + ], + "kind": "pipeline", + "name": "build-ubuntu-1804", + "steps": [ + { + "image": "saltstack/drone-plugin-kitchen", + "name": "build", + "privileged": true, + "settings": { + "requirements": "tests/requirements.txt", + "target": "ubuntu-1804" + }, + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- -kind: pipeline -name: run-shellcheck - -platform: - os: linux - arch: amd64 - -steps: -- name: run-shellcheck - image: koalaman/shellcheck-alpine - commands: - - shellcheck -s sh -f checkstyle bootstrap-salt.sh - when: - event: - - pull_request - +{ + "kind": "pipeline", + "name": "run-shellcheck", + "steps": [ + { + "commands": [ + "shellcheck -s sh -f checkstyle bootstrap-salt.sh" + ], + "image": "koalaman/shellcheck-alpine", + "name": "run-shellcheck", + "when": { + "event": [ + "pull_request" + ] + } + } + ] +} --- kind: signature -hmac: 3932ad0ad24dfbc51ac7367295fbd3c95288dc79bfb12246269965f9a9965ae4 +hmac: 28ee922e7781842a8666344b4f7ebce3a5c0971db4f2a78c240548c45ff251d4 ... From 5833caaa1acf7c48f135373c41db068d767a2d10 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:17:14 -0700 Subject: [PATCH 20/36] reformatting --- .drone.jsonnet | 2 +- .drone.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 9c06c5d..b7e831f 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -23,7 +23,7 @@ local Shellcheck() = { name: 'run-shellcheck', steps: [ { - name: 'run-shellcheck', + name: 'shellcheck', image: 'koalaman/shellcheck-alpine', commands: [ 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', diff --git a/.drone.yml b/.drone.yml index 886b670..d5197bb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -152,7 +152,7 @@ "shellcheck -s sh -f checkstyle bootstrap-salt.sh" ], "image": "koalaman/shellcheck-alpine", - "name": "run-shellcheck", + "name": "shellcheck", "when": { "event": [ "pull_request" @@ -163,6 +163,6 @@ } --- kind: signature -hmac: 28ee922e7781842a8666344b4f7ebce3a5c0971db4f2a78c240548c45ff251d4 +hmac: e0f575abc8248a3efe3291836aaee209aac496312196dc8289c4e5abc8268c3a ... From 13039e8ce05dc481596bdf8d66857ac385405a62 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:27:03 -0700 Subject: [PATCH 21/36] Reformatting to drone format --- .drone.jsonnet | 34 +++--- .drone.yml | 300 +++++++++++++++++++++++-------------------------- 2 files changed, 159 insertions(+), 175 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index b7e831f..1af3ea8 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,6 +1,22 @@ +local Shellcheck() = { + kind: 'pipeline', + name: 'run-shellcheck', + steps: [ + { + name: 'shellcheck', + image: 'koalaman/shellcheck-alpine', + commands: [ + 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', + ], + when: { event: ['pull_request'] } + } + ] +}; + local Build(os, os_version) = { kind: 'pipeline', name: 'build-' + os + '-' + os_version, + steps: [ { name: 'build', @@ -17,21 +33,6 @@ local Build(os, os_version) = { 'run-shellcheck' ] }; - -local Shellcheck() = { - kind: 'pipeline', - name: 'run-shellcheck', - steps: [ - { - name: 'shellcheck', - image: 'koalaman/shellcheck-alpine', - commands: [ - 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', - ], - when: { event: ['pull_request'] } - } - ] -}; local distros = [ { name: 'centos', version: '6' }, @@ -46,6 +47,7 @@ local distros = [ [ Build(distro.name, distro.version) for distro in distros -] + [ +] + +[ Shellcheck() ] diff --git a/.drone.yml b/.drone.yml index d5197bb..7b3564f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,168 +1,150 @@ --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-centos-6", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "centos-6" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-centos-6 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: centos-6 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-centos-7", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "centos-7" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-centos-7 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: centos-7 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-debian-8", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "debian-8" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-debian-8 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: debian-8 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-debian-9", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "debian-9" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-debian-9 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: debian-9 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-ubuntu-1404", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "ubuntu-1404" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-ubuntu-1404 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: ubuntu-1404 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "depends_on": [ - "run-shellcheck" - ], - "kind": "pipeline", - "name": "build-ubuntu-1804", - "steps": [ - { - "image": "saltstack/drone-plugin-kitchen", - "name": "build", - "privileged": true, - "settings": { - "requirements": "tests/requirements.txt", - "target": "ubuntu-1804" - }, - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} +kind: pipeline +name: build-ubuntu-1804 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt + target: ubuntu-1804 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + --- -{ - "kind": "pipeline", - "name": "run-shellcheck", - "steps": [ - { - "commands": [ - "shellcheck -s sh -f checkstyle bootstrap-salt.sh" - ], - "image": "koalaman/shellcheck-alpine", - "name": "shellcheck", - "when": { - "event": [ - "pull_request" - ] - } - } - ] -} ---- -kind: signature -hmac: e0f575abc8248a3efe3291836aaee209aac496312196dc8289c4e5abc8268c3a +kind: pipeline +name: run-shellcheck + +platform: + os: linux + arch: amd64 + +steps: +- name: shellcheck + image: koalaman/shellcheck-alpine + commands: + - shellcheck -s sh -f checkstyle bootstrap-salt.sh + when: + event: + - pull_request ... From 1faf5f869fb94fef2effae1ce0689b42a400625d Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:35:53 -0700 Subject: [PATCH 22/36] Reformatting to drone format again --- .drone.jsonnet | 8 +++++--- .drone.yml | 14 +++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 1af3ea8..4435bfa 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,9 +1,10 @@ local Shellcheck() = { kind: 'pipeline', name: 'run-shellcheck', + steps: [ { - name: 'shellcheck', + name: 'run-shellcheck', image: 'koalaman/shellcheck-alpine', commands: [ 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', @@ -19,7 +20,7 @@ local Build(os, os_version) = { steps: [ { - name: 'build', + name: 'build-' + os + '-' + os_version, image: 'saltstack/drone-plugin-kitchen', privileged: true, settings: { @@ -47,7 +48,8 @@ local distros = [ [ Build(distro.name, distro.version) for distro in distros -] + +] ++ [ Shellcheck() ] diff --git a/.drone.yml b/.drone.yml index 7b3564f..815e841 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-centos-6 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -29,7 +29,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-centos-7 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -51,7 +51,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-debian-8 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -73,7 +73,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-debian-9 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -95,7 +95,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-ubuntu-1404 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -117,7 +117,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-ubuntu-1804 image: saltstack/drone-plugin-kitchen settings: requirements: tests/requirements.txt @@ -139,7 +139,7 @@ platform: arch: amd64 steps: -- name: shellcheck +- name: run-shellcheck image: koalaman/shellcheck-alpine commands: - shellcheck -s sh -f checkstyle bootstrap-salt.sh From f6a1eb668eab02ccb1a3bebae9e1703b62bda8b6 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:40:23 -0700 Subject: [PATCH 23/36] reverting to old --- .drone.yml | 328 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 191 insertions(+), 137 deletions(-) diff --git a/.drone.yml b/.drone.yml index 815e841..f360128 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,145 +1,9 @@ ---- -kind: pipeline -name: build-centos-6 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-centos-6 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: centos-6 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-centos-7 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-centos-7 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: centos-7 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-debian-8 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-debian-8 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: debian-8 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-debian-9 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-debian-9 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: debian-9 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-ubuntu-1404 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-ubuntu-1404 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: ubuntu-1404 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-ubuntu-1804 - -platform: - os: linux - arch: amd64 - -steps: -- name: build-ubuntu-1804 - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: ubuntu-1804 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - --- kind: pipeline name: run-shellcheck -platform: - os: linux - arch: amd64 - steps: -- name: run-shellcheck +- name: build image: koalaman/shellcheck-alpine commands: - shellcheck -s sh -f checkstyle bootstrap-salt.sh @@ -147,4 +11,194 @@ steps: event: - pull_request +--- +kind: pipeline +name: build-centos6 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + failure: ignore + settings: + target: centos-6 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-centos7 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: centos-7 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-amazon1 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: amazon-1 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-amazon2 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: amazon-2 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-debian8 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + failure: ignore + settings: + target: debian-8 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-debian9 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + failure: ignore + settings: + target: debian-9 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-fedora + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: fedora + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-opensuse + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: opensuse + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-ubuntu1604 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: ubuntu-1604 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-ubuntu1804 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + privileged: true + settings: + target: ubuntu-1804 + requirements: tests/requirements.txt + when: + event: + - pull_request + +depends_on: +- run-shellcheck + + + +--- +--- +kind: signature +hmac: a31505227173366492f3e1f12de826593b380306a1bb735d36c2b85d770bea8f + ... From 4488ed1c713fd3dd86228eaa92c8fdacf5a63e40 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 11:44:42 -0700 Subject: [PATCH 24/36] fixed default error --- .drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index f360128..1538a46 100644 --- a/.drone.yml +++ b/.drone.yml @@ -195,8 +195,6 @@ depends_on: - run-shellcheck - ---- --- kind: signature hmac: a31505227173366492f3e1f12de826593b380306a1bb735d36c2b85d770bea8f From c202e30d0ad274bd98a8d3c8cdd94a8ccdd34200 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 12:57:34 -0700 Subject: [PATCH 25/36] Removing Centos 6 and Ubuntu 16 they are broken atm --- .drone.jsonnet | 6 +++--- .drone.yml | 37 ------------------------------------- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 4435bfa..1e37d37 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -4,7 +4,7 @@ local Shellcheck() = { steps: [ { - name: 'run-shellcheck', + name: 'build', image: 'koalaman/shellcheck-alpine', commands: [ 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', @@ -20,9 +20,9 @@ local Build(os, os_version) = { steps: [ { - name: 'build-' + os + '-' + os_version, - image: 'saltstack/drone-plugin-kitchen', + name: 'build', privileged: true, + image: 'saltstack/drone-plugin-kitchen', settings: { target: os + '-' + os_version, requirements: 'tests/requirements.txt', diff --git a/.drone.yml b/.drone.yml index 1538a46..85f7945 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,25 +11,6 @@ steps: event: - pull_request ---- -kind: pipeline -name: build-centos6 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore - settings: - target: centos-6 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - --- kind: pipeline name: build-centos7 @@ -158,24 +139,6 @@ steps: depends_on: - run-shellcheck ---- -kind: pipeline -name: build-ubuntu1604 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: - target: ubuntu-1604 - requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - --- kind: pipeline name: build-ubuntu1804 From 9203519aabf90d1f4d91ddb4780cdddf109d52ed Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 13:18:24 -0700 Subject: [PATCH 26/36] Adding updates to drone files --- .drone.jsonnet | 15 ++---- .drone.yml | 123 +++++++++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 1e37d37..31fa47a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -36,7 +36,9 @@ local Build(os, os_version) = { }; local distros = [ - { name: 'centos', version: '6' }, + { name: 'amazon', version: '1' }, + { name: 'amazon', version: '2' }, +# { name: 'centos', version: '6' }, { name: 'centos', version: '7' }, { name: 'debian', version: '8' }, { name: 'debian', version: '9' }, @@ -44,12 +46,5 @@ local distros = [ # { name: 'ubuntu', version: '1604' }, { name: 'ubuntu', version: '1804' }, ]; - -[ - Build(distro.name, distro.version) - for distro in distros -] -+ -[ - Shellcheck() -] + +[Shellcheck()] + [Build(distro.name, distro.version)for distro in distros] diff --git a/.drone.yml b/.drone.yml index 85f7945..434e630 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,10 @@ kind: pipeline name: run-shellcheck +platform: + os: linux + arch: amd64 + steps: - name: build image: koalaman/shellcheck-alpine @@ -13,33 +17,19 @@ steps: --- kind: pipeline -name: build-centos7 +name: build-amazon-1 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true settings: - target: centos-7 requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-amazon1 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: target: amazon-1 - requirements: tests/requirements.txt + privileged: true when: event: - pull_request @@ -49,15 +39,19 @@ depends_on: --- kind: pipeline -name: build-amazon2 +name: build-amazon-2 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true settings: + requirements: tests/requirements.txt target: amazon-2 - requirements: tests/requirements.txt + privileged: true when: event: - pull_request @@ -67,16 +61,41 @@ depends_on: --- kind: pipeline -name: build-debian8 +name: build-centos-7 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore settings: + requirements: tests/requirements.txt + target: centos-7 + privileged: true + when: + event: + - pull_request + +depends_on: +- run-shellcheck + +--- +kind: pipeline +name: build-debian-8 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: saltstack/drone-plugin-kitchen + settings: + requirements: tests/requirements.txt target: debian-8 - requirements: tests/requirements.txt + privileged: true when: event: - pull_request @@ -86,16 +105,19 @@ depends_on: --- kind: pipeline -name: build-debian9 +name: build-debian-9 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true - failure: ignore settings: + requirements: tests/requirements.txt target: debian-9 - requirements: tests/requirements.txt + privileged: true when: event: - pull_request @@ -105,15 +127,19 @@ depends_on: --- kind: pipeline -name: build-fedora +name: build-ubuntu-1404 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true settings: - target: fedora requirements: tests/requirements.txt + target: ubuntu-1404 + privileged: true when: event: - pull_request @@ -123,33 +149,19 @@ depends_on: --- kind: pipeline -name: build-opensuse +name: build-ubuntu-1804 + +platform: + os: linux + arch: amd64 steps: - name: build image: saltstack/drone-plugin-kitchen - privileged: true settings: - target: opensuse requirements: tests/requirements.txt - when: - event: - - pull_request - -depends_on: -- run-shellcheck - ---- -kind: pipeline -name: build-ubuntu1804 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - privileged: true - settings: target: ubuntu-1804 - requirements: tests/requirements.txt + privileged: true when: event: - pull_request @@ -157,9 +169,8 @@ steps: depends_on: - run-shellcheck - --- kind: signature -hmac: a31505227173366492f3e1f12de826593b380306a1bb735d36c2b85d770bea8f +hmac: 3872650e56f228942361778f1a5b97b9d9447d880e951df3e938db66db4dc4b5 ... From a76a72de79a5c5b0d6dd0b42ef9a3b8d54d2e45b Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Fri, 1 Feb 2019 13:47:55 -0700 Subject: [PATCH 27/36] Removing ubuntu 14 --- .drone.jsonnet | 2 +- .drone.yml | 24 +----------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 31fa47a..cde75c7 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -42,7 +42,7 @@ local distros = [ { name: 'centos', version: '7' }, { name: 'debian', version: '8' }, { name: 'debian', version: '9' }, - { name: 'ubuntu', version: '1404' }, +# { name: 'ubuntu', version: '1404' }, # { name: 'ubuntu', version: '1604' }, { name: 'ubuntu', version: '1804' }, ]; diff --git a/.drone.yml b/.drone.yml index 434e630..4ad02e9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -125,28 +125,6 @@ steps: depends_on: - run-shellcheck ---- -kind: pipeline -name: build-ubuntu-1404 - -platform: - os: linux - arch: amd64 - -steps: -- name: build - image: saltstack/drone-plugin-kitchen - settings: - requirements: tests/requirements.txt - target: ubuntu-1404 - privileged: true - when: - event: - - pull_request - -depends_on: -- run-shellcheck - --- kind: pipeline name: build-ubuntu-1804 @@ -171,6 +149,6 @@ depends_on: --- kind: signature -hmac: 3872650e56f228942361778f1a5b97b9d9447d880e951df3e938db66db4dc4b5 +hmac: 177ea56204b3976fd6728cbddd22a8fab85c9d487294021221871cfb3d568efa ... From 431e272036974c6efcedcf9b5a27beca12946aa0 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Sat, 2 Feb 2019 02:17:58 +0000 Subject: [PATCH 28/36] add support for the Debian derivative TurnKey Linux --- bootstrap-salt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5713913..1330ac1 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1431,7 +1431,7 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(cumulus_.+|devuan|kali|linuxmint|raspbian|bunsenlabs)" + DEBIAN_DERIVATIVES="(cumulus_.+|devuan|kali|linuxmint|raspbian|bunsenlabs|turnkey)" # Mappings cumulus_2_debian_base="7.0" cumulus_3_debian_base="8.0" @@ -1442,6 +1442,7 @@ __debian_derivatives_translation() { raspbian_8_debian_base="8.0" raspbian_9_debian_base="9.0" bunsenlabs_9_debian_base="9.0" + turnkey_9_debian_base="9.0" # Translate Debian derivatives to their base Debian version match=$(echo "$DISTRO_NAME_L" | grep -E ${DEBIAN_DERIVATIVES}) @@ -1472,6 +1473,10 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="bunsenlabs" ;; + turnkey) + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') + _debian_derivative="bunsenlabs" + ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base" 2>/dev/null) From 7632516881c5bd06ad240b2a901296f7d923e095 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Tue, 5 Feb 2019 13:00:02 +0000 Subject: [PATCH 29/36] correct copy/paste error --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1330ac1..5420f00 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1475,7 +1475,7 @@ __debian_derivatives_translation() { ;; turnkey) _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') - _debian_derivative="bunsenlabs" + _debian_derivative="turnkey" ;; esac From d987166bf6f06b0e669b9aaef9c0c5af577b0853 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Tue, 5 Feb 2019 11:36:37 -0700 Subject: [PATCH 30/36] removing travis and jenkins as build tools --- .kitchen.yml | 1 + .travis.yml | 55 ------------------------- Jenkinsfile | 114 --------------------------------------------------- 3 files changed, 1 insertion(+), 169 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Jenkinsfile diff --git a/.kitchen.yml b/.kitchen.yml index f5d4a2c..71a43d1 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -8,6 +8,7 @@ driver: cap_add: - sys_admin disable_upstart: false + use_internal_docker_network: true provisioner: name: salt_solo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7232546..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -language: ruby - -services: - - docker - -addons: - apt: - packages: - - curl - - git - - shellcheck - - python-pip - -rvm: - - ruby - -env: - matrix: - - PLATFORM=fedora - - PLATFORM=centos-7 - - PLATFORM=centos-6 - - PLATFORM=amazon-1 - - PLATFORM=amazon-2 - - PLATFORM=ubuntu-1804 - - PLATFORM=ubuntu-1604 - - PLATFORM=ubuntu-1404 - - PLATFORM=debian-8 - - PLATFORM=debian-9 - - PLATFORM=arch - - PLATFORM=opensuse - -matrix: - allow_failures: - - env: PLATFORM=ubuntu-1804 - - env: PLATFORM=ubuntu-1604 - - env: PLATFORM=debian-8 - - env: PLATFORM=debian-9 - - env: PLATFORM=centos-6 - -sudo: true -dist: trusty - -before_install: - - pip install --user -r tests/requirements.txt - -script: - # Check shell scripts - - shellcheck -s sh -f checkstyle bootstrap-salt.sh - # Run test-kitchen with docker driver: - - bundle exec kitchen create -l warn -c 6 "$PLATFORM" - - bundle exec kitchen verify "$PLATFORM" - -after_script: - - bundle exec kitchen list $PLATFORM - - bundle exec kitchen destroy "$PLATFORM" diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index b135966..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,114 +0,0 @@ -import java.util.Random - -Random rand = new Random() - -// ONLY CHANGE THIS BIT PLEASE -def baseDistros = ["debian8", - "suse", - "centos6", - "arch", - "ubuntu-14.04", - "ubuntu-18.04", - "windows", - ] -def versions = ["stable", "git", "stable-old"] - -def basePrDistros = ["ubuntu-16.04", - "centos7"] - -def prVersions = ["stable", "git"] - -// You probably shouldn't be messing with this stuff down here - -def distros = (baseDistros + basePrDistros).unique() - -def notifySuccessful(String stageName) { - slackSend (color: '#00FF00', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" + "\n Stage -- " + stageName) -} - -def notifyFailed(String stageName) { - slackSend (color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" + "\n Stage -- " + stageName) -} - -def runKitchen(String distro) { - echo "kitchen create ${distro}" - echo "kitchen converge ${distro}" - echo "kitchen destroy ${distro}" -} - -def distroversions = [] -for (d in distros) { - for (v in versions) { - distroversions = distroversions + ["${d}-${v}"] - } -} - -def prDistros = (basePrDistros + distros[rand.nextInt(baseDistros.size())]).unique() - -def prDistroversions = [] -for (d in prDistros) { - for (v in prVersions) { - prDistroversions = prDistroversions + ["${d}-${v}"] - } -} - -def makeSetupRuns(dv) { - return { - node { - runKitchen("${dv}") - } - } -} - -def setupRuns = distroversions.collectEntries { - ["kitchen-${it}" : makeSetupRuns("${it}")] -} - -def prSetupRuns = prDistroversions.collectEntries { - ["kitchen-${it}" : makeSetupRuns("${it}")] -} - -node ('bootstrap') { - timestamps { - ansiColor('xterm') { - stage('checkout') { checkout scm } - stage('shellcheck') { - sh 'stack exec -- shellcheck -s sh -f checkstyle bootstrap-salt.sh | tee checkstyle.xml' - checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/checkstyle.xml', unHealthy: '', unstableTotalAll: '0' - archiveArtifacts artifacts: '**/checkstyle.xml' - } - // if (env.CHANGE_ID) { - // // Running for a PR only runs against 4 random distros from a shorter list - // stage('kitchen-pr') { - // parallel prSetupRuns - // } - // } else { - // // If we're not running for a pr we run *everything* - // stage('kitchen-all') { - // parallel setupRuns - // } - // } - } - } -} - -/* - * TODO: - * 1. Tests for each supported distro in bootstrap + branch shellcheck test (Shellcheck should be done) - * 2. Each distro needs a "stable" install (installs stable packages from our repo) and a "git" install (installs off of a git tag) - * 3. Running against each branch (stable, develop) - * 4. And probably a small subset against each pull request (similar to what we do in salt) - * - * Distros to check: - * Debian 8 - * Suse 42.1 - * CentOS 7 - * CentOS 6 - * Arch - * Ubuntu 16.04 - * Ubuntu 14.04 - * Windows - * - * Runs each against develop and stable - * - */ From 2e95f157f51a14a9b261c0c10beb549ac893443d Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 6 Feb 2019 16:04:08 +0100 Subject: [PATCH 31/36] fix FreeBSD develop install --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5713913..b83dc41 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5231,6 +5231,8 @@ install_freebsd_git_deps() { SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search ${FROM_FREEBSD} -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ') # shellcheck disable=SC2086 /usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${SALT_DEPENDENCIES} || return 1 + # install python meta package + /usr/local/sbin/pkg install -y lang/python || return 1 if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 From 2624df8e39f268aae83f3f0bfa792462173b6da8 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 6 Feb 2019 09:22:02 -0700 Subject: [PATCH 32/36] Updating to string replacements --- .drone.jsonnet | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index cde75c7..167cc2b 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,3 +1,15 @@ +local distros = [ + { name: 'amazon', version: '1' }, + { name: 'amazon', version: '2' }, +# { name: 'centos', version: '6' }, + { name: 'centos', version: '7' }, + { name: 'debian', version: '8' }, + { name: 'debian', version: '9' }, +# { name: 'ubuntu', version: '1404' }, +# { name: 'ubuntu', version: '1604' }, + { name: 'ubuntu', version: '1804' }, +]; + local Shellcheck() = { kind: 'pipeline', name: 'run-shellcheck', @@ -16,7 +28,7 @@ local Shellcheck() = { local Build(os, os_version) = { kind: 'pipeline', - name: 'build-' + os + '-' + os_version, + name: std.format('build-%s-%s', [os, os_version]), steps: [ { @@ -24,7 +36,7 @@ local Build(os, os_version) = { privileged: true, image: 'saltstack/drone-plugin-kitchen', settings: { - target: os + '-' + os_version, + target: std.format('%s-%s', [os, os_version]), requirements: 'tests/requirements.txt', }, when: { event: ['pull_request'] }, @@ -35,16 +47,6 @@ local Build(os, os_version) = { ] }; -local distros = [ - { name: 'amazon', version: '1' }, - { name: 'amazon', version: '2' }, -# { name: 'centos', version: '6' }, - { name: 'centos', version: '7' }, - { name: 'debian', version: '8' }, - { name: 'debian', version: '9' }, -# { name: 'ubuntu', version: '1404' }, -# { name: 'ubuntu', version: '1604' }, - { name: 'ubuntu', version: '1804' }, -]; + [Shellcheck()] + [Build(distro.name, distro.version)for distro in distros] From 3789fc561e3e311ad62e401b4820658ce0a74e0f Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 6 Feb 2019 09:56:56 -0700 Subject: [PATCH 33/36] Updating the Docs --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec421fd..b7a3a8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,7 +96,7 @@ a bug fix or feature implementation can be merged in. ### PR Tests -There are several Jenkins jobs that run on each Pull Request. Most of these are +There are several build jobs that run on each Pull Request. Most of these are CI jobs that set up different steps, such as setting up the job, cloning the repo from the PR, etc. From 2012ba4a6b3656b47ba68101b5ae4cbc50720514 Mon Sep 17 00:00:00 2001 From: Brett Benassi Date: Wed, 6 Feb 2019 15:13:52 -0700 Subject: [PATCH 34/36] Update README to have correct build status Adding Drone status --- README.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index fa26ea1..04b5632 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ Bootstrapping Salt ================== -|windows_build| +|build| .. contents:: :local: @@ -425,9 +425,8 @@ Salt components, custom configurations, and even `pre-accepted Minion keys`_ alr .. _`Ubuntu's release schedule`: https://wiki.ubuntu.com/Releases .. _Vagrant: http://www.vagrantup.com - -.. |windows_build| image:: https://ci.appveyor.com/api/projects/status/github/saltstack/salt-bootstrap?branch=develop&svg=true - :target: https://ci.appveyor.com/project/saltstack-public/salt-bootstrap - :alt: Build status of the develop branch on Windows +.. |build| image:: https://drone.saltstack.com/api/badges/saltstack/salt-bootstrap/status.svg + :target: https://drone.saltstack.com/saltstack/salt-bootstrap + :alt: Build status on Linux .. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et From 88b1d04f6af3907de0807762fdbf0c159b2485d3 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Mon, 25 Feb 2019 13:43:17 -0800 Subject: [PATCH 35/36] Ensure python-concurrent.futures is installed for Ubuntu. --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5713913..4dd6e59 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2783,6 +2783,7 @@ install_ubuntu_git_deps() { __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-zmq" + __PACKAGES="${__PACKAGES} python-concurrent.futures" if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then # Install python-libcloud if asked to From bf40b1d31f67c26481efed6730a7ca0ec8af415a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 26 Feb 2019 00:09:59 +0000 Subject: [PATCH 36/36] Remove drone triggers. We want builds for PRs and branch merges. --- .drone.jsonnet | 30 ++++++++++++++++-------------- .drone.yml | 23 +---------------------- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 167cc2b..269534f 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,19 +1,19 @@ local distros = [ { name: 'amazon', version: '1' }, { name: 'amazon', version: '2' }, -# { name: 'centos', version: '6' }, + // { name: 'centos', version: '6' }, { name: 'centos', version: '7' }, { name: 'debian', version: '8' }, { name: 'debian', version: '9' }, -# { name: 'ubuntu', version: '1404' }, -# { name: 'ubuntu', version: '1604' }, + // { name: 'ubuntu', version: '1404' }, + // { name: 'ubuntu', version: '1604' }, { name: 'ubuntu', version: '1804' }, ]; local Shellcheck() = { kind: 'pipeline', name: 'run-shellcheck', - + steps: [ { name: 'build', @@ -21,15 +21,14 @@ local Shellcheck() = { commands: [ 'shellcheck -s sh -f checkstyle bootstrap-salt.sh', ], - when: { event: ['pull_request'] } - } - ] + }, + ], }; local Build(os, os_version) = { kind: 'pipeline', name: std.format('build-%s-%s', [os, os_version]), - + steps: [ { name: 'build', @@ -39,14 +38,17 @@ local Build(os, os_version) = { target: std.format('%s-%s', [os, os_version]), requirements: 'tests/requirements.txt', }, - when: { event: ['pull_request'] }, - }, + }, ], depends_on: [ - 'run-shellcheck' - ] + 'run-shellcheck', + ], }; - -[Shellcheck()] + [Build(distro.name, distro.version)for distro in distros] +[ + Shellcheck(), +] + [ + Build(distro.name, distro.version) + for distro in distros +] diff --git a/.drone.yml b/.drone.yml index 4ad02e9..07d8a12 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,9 +11,6 @@ steps: image: koalaman/shellcheck-alpine commands: - shellcheck -s sh -f checkstyle bootstrap-salt.sh - when: - event: - - pull_request --- kind: pipeline @@ -30,9 +27,6 @@ steps: requirements: tests/requirements.txt target: amazon-1 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck @@ -52,9 +46,6 @@ steps: requirements: tests/requirements.txt target: amazon-2 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck @@ -74,9 +65,6 @@ steps: requirements: tests/requirements.txt target: centos-7 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck @@ -96,9 +84,6 @@ steps: requirements: tests/requirements.txt target: debian-8 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck @@ -118,9 +103,6 @@ steps: requirements: tests/requirements.txt target: debian-9 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck @@ -140,15 +122,12 @@ steps: requirements: tests/requirements.txt target: ubuntu-1804 privileged: true - when: - event: - - pull_request depends_on: - run-shellcheck --- kind: signature -hmac: 177ea56204b3976fd6728cbddd22a8fab85c9d487294021221871cfb3d568efa +hmac: 563c4cb4cefd58c08143192bd72c5a25c5d0edbe4a6d1f5f89c87d3ca2024246 ...