From 93a25837f87c5beebd6977a9e6b294b3446ae83a Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 20 Jun 2019 01:07:31 +0800 Subject: [PATCH] add testing Signed-off-by: Bo-Yi Wu --- .drone.jsonnet | 9 ++++++ .drone.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++-- pipeline.libsonnet | 26 +++++++++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 .drone.jsonnet create mode 100644 pipeline.libsonnet diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..4d331f0 --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,9 @@ +local pipeline = import 'pipeline.libsonnet'; +local name = 'drone-facebook'; + +[ + pipeline.build('2.4', 'linux', 'amd64'), + pipeline.build('2.5', 'linux', 'amd64'), + pipeline.build('2.6', 'linux', 'amd64'), + pipeline.build('2.7', 'linux', 'amd64'), +] diff --git a/.drone.yml b/.drone.yml index faa76f2..6c05884 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ --- kind: pipeline -name: testing +name: linux-amd64 platform: os: linux @@ -9,7 +9,73 @@ platform: steps: - name: lint pull: always - image: ansible/ansible:ubuntu1404 + image: chusiang/ansible:2.4 commands: + - "echo \"==> Syntax Check on Ansible 2.4 ...\"" - ansible --version - ansible-lint tasks/setup.yml + - ansible-playbook --syntax-check + environment: + ANSIBLE_VERSION: 2.4 + +--- +kind: pipeline +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: lint + pull: always + image: chusiang/ansible:2.5 + commands: + - "echo \"==> Syntax Check on Ansible 2.5 ...\"" + - ansible --version + - ansible-lint tasks/setup.yml + - ansible-playbook --syntax-check + environment: + ANSIBLE_VERSION: 2.5 + +--- +kind: pipeline +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: lint + pull: always + image: chusiang/ansible:2.6 + commands: + - "echo \"==> Syntax Check on Ansible 2.6 ...\"" + - ansible --version + - ansible-lint tasks/setup.yml + - ansible-playbook --syntax-check + environment: + ANSIBLE_VERSION: 2.6 + +--- +kind: pipeline +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: lint + pull: always + image: chusiang/ansible:2.7 + commands: + - "echo \"==> Syntax Check on Ansible 2.7 ...\"" + - ansible --version + - ansible-lint tasks/setup.yml + - ansible-playbook --syntax-check + environment: + ANSIBLE_VERSION: 2.7 + +... diff --git a/pipeline.libsonnet b/pipeline.libsonnet new file mode 100644 index 0000000..7c2ee1f --- /dev/null +++ b/pipeline.libsonnet @@ -0,0 +1,26 @@ +{ + build(version, os='linux', arch='amd64'):: { + kind: 'pipeline', + name: os + '-' + arch, + platform: { + os: os, + arch: arch, + }, + steps: [ + { + name: 'lint', + image: 'chusiang/ansible:' + version, + pull: 'always', + environment: { + ANSIBLE_VERSION: version, + }, + commands: [ + 'echo "==> Syntax Check on Ansible ' + version + ' ..."', + 'ansible --version', + 'ansible-lint tasks/setup.yml', + 'ansible-playbook --syntax-check', + ], + }, + ], + }, +}