From 50bbe8619efd27b4aae6a0b7aeb8ee637cc50152 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:13:50 +0100 Subject: [PATCH 001/131] test molecule integration --- .drone.yml | 35 +++++++++++++++----------- .gitignore | 5 ++++ molecule/default/coverage.yml | 0 molecule/default/molecule.yml | 25 ++++++++++++++++++ molecule/default/playbook.yml | 5 ++++ molecule/default/tests/test_default.py | 14 +++++++++++ 6 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 .gitignore create mode 100644 molecule/default/coverage.yml create mode 100644 molecule/default/molecule.yml create mode 100644 molecule/default/playbook.yml create mode 100644 molecule/default/tests/test_default.py diff --git a/.drone.yml b/.drone.yml index 289d224..2450a73 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,20 +3,27 @@ kind: pipeline name: default steps: - - name: ansible-latest - image: python:2.7 - pull: always - commands: - - pip install ansible ansible-later -q - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] + # - name: ansible-latest + # image: python:2.7 + # pull: always + # commands: + # - pip install ansible ansible-later -q + # - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + # depends_on: [ clone ] + + # - name: ansible-master + # image: python:2.7 + # pull: always + # commands: + # - pip install ansible ansible-later -q + # - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + # depends_on: [ clone ] - - name: ansible-master - image: python:2.7 + - name: molecule + image: quay.io/ansible/molecule pull: always commands: - - pip install ansible ansible-later -q - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] + - pip install ansible -qq + - molecule test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69810f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class diff --git a/molecule/default/coverage.yml b/molecule/default/coverage.yml new file mode 100644 index 0000000..e69de29 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml new file mode 100644 index 0000000..ae54c89 --- /dev/null +++ b/molecule/default/molecule.yml @@ -0,0 +1,25 @@ +--- +dependency: + name: galaxy +driver: + name: delegated + options: + managed: False + ansible_connection_options: + ansible_connection: local +lint: + name: yamllint +platforms: + - name: instance +provisioner: + name: ansible + lint: + name: ansible-lint + playbooks: + converge: coverage.yml +scenario: + name: default +verifier: + name: testinfra + lint: + name: flake8 diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml new file mode 100644 index 0000000..bebc4b5 --- /dev/null +++ b/molecule/default/playbook.yml @@ -0,0 +1,5 @@ +--- +- name: Converge + hosts: all + roles: + - role: xoxys.nginx diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py new file mode 100644 index 0000000..eedd64a --- /dev/null +++ b/molecule/default/tests/test_default.py @@ -0,0 +1,14 @@ +import os + +import testinfra.utils.ansible_runner + +testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') + + +def test_hosts_file(host): + f = host.file('/etc/hosts') + + assert f.exists + assert f.user == 'root' + assert f.group == 'root' -- 2.24.4 From 0cbd764bc957b6bb33d721722b0c89b5a51eb448 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:17:39 +0100 Subject: [PATCH 002/131] test --- molecule/default/molecule.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index ae54c89..4ed559e 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,8 +7,6 @@ driver: managed: False ansible_connection_options: ansible_connection: local -lint: - name: yamllint platforms: - name: instance provisioner: -- 2.24.4 From b3759ebacce9c09d27d30b6c10758f123ff6f9c5 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:18:55 +0100 Subject: [PATCH 003/131] test --- molecule/default/molecule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 4ed559e..a114b6a 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,12 +7,12 @@ driver: managed: False ansible_connection_options: ansible_connection: local +lint: + name: yamllint platforms: - name: instance provisioner: name: ansible - lint: - name: ansible-lint playbooks: converge: coverage.yml scenario: -- 2.24.4 From 599ec3c4c64af19f66faf7c5996cae1ffe8c4394 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:19:35 +0100 Subject: [PATCH 004/131] test --- molecule/default/molecule.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index a114b6a..09ff1ca 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,8 +7,6 @@ driver: managed: False ansible_connection_options: ansible_connection: local -lint: - name: yamllint platforms: - name: instance provisioner: -- 2.24.4 From feb521815ed0db683713feba13d3830eaf1479be Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:22:41 +0100 Subject: [PATCH 005/131] disable yamllint --- molecule/default/molecule.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 09ff1ca..c7f2b27 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -7,10 +7,15 @@ driver: managed: False ansible_connection_options: ansible_connection: local +lint: + name: yamllint + enabled: False platforms: - name: instance provisioner: name: ansible + lint: + name: ansible-lint playbooks: converge: coverage.yml scenario: -- 2.24.4 From 63c1597ae128d7db929d426ceed30a080aab60f4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:29:50 +0100 Subject: [PATCH 006/131] enable molecule debug --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2450a73..4151ab0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,4 +26,4 @@ steps: pull: always commands: - pip install ansible -qq - - molecule test + - molecule --debug test -- 2.24.4 From 9608f99891423460353a9a35942f46e919a3c2a4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:38:56 +0100 Subject: [PATCH 007/131] test against centos image --- .drone.yml | 4 ++-- molecule/default/playbook.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4151ab0..0db9801 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,8 +22,8 @@ steps: # depends_on: [ clone ] - name: molecule - image: quay.io/ansible/molecule + image: centos:7 pull: always commands: - - pip install ansible -qq + - pip install ansible molecule -qq - molecule --debug test diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index bebc4b5..22c7cb9 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -1,5 +1,5 @@ --- - name: Converge - hosts: all + hosts: localhost roles: - role: xoxys.nginx -- 2.24.4 From 39a9b141813544ba071e7ef8aa906c14dc7ac9b7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:41:46 +0100 Subject: [PATCH 008/131] add pip --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 0db9801..3bda94d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,5 +25,6 @@ steps: image: centos:7 pull: always commands: + - yum install -y --no-cache python-pip - pip install ansible molecule -qq - molecule --debug test -- 2.24.4 From 572b1227fb9bd336c70c537280acdcac191860bf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 15:59:53 +0100 Subject: [PATCH 009/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 3bda94d..b544ff0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,6 @@ steps: image: centos:7 pull: always commands: - - yum install -y --no-cache python-pip + - yum install -y python-pip - pip install ansible molecule -qq - molecule --debug test -- 2.24.4 From 1d381b0b4d2885fa81d5a41ca6508ddc1447d86a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 26 Feb 2019 16:03:16 +0100 Subject: [PATCH 010/131] add epel --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index b544ff0..dbb7ae3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,7 @@ steps: image: centos:7 pull: always commands: + - yum install -y epel-release - yum install -y python-pip - pip install ansible molecule -qq - molecule --debug test -- 2.24.4 From ae2035f52377e72dd711221acf0bb27434d62a60 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 10:37:29 +0100 Subject: [PATCH 011/131] test molecule with gce --- .drone.yml | 7 +-- .yamllint | 13 +++++ molecule/gce-centos-7/INSTALL.rst | 16 +++++ molecule/gce-centos-7/create.yml | 65 +++++++++++++++++++++ molecule/gce-centos-7/destroy.yml | 39 +++++++++++++ molecule/gce-centos-7/molecule.yml | 23 ++++++++ molecule/gce-centos-7/playbook.yml | 5 ++ molecule/gce-centos-7/prepare.yml | 9 +++ molecule/gce-centos-7/tests/test_default.py | 14 +++++ 9 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 .yamllint create mode 100644 molecule/gce-centos-7/INSTALL.rst create mode 100644 molecule/gce-centos-7/create.yml create mode 100644 molecule/gce-centos-7/destroy.yml create mode 100644 molecule/gce-centos-7/molecule.yml create mode 100644 molecule/gce-centos-7/playbook.yml create mode 100644 molecule/gce-centos-7/prepare.yml create mode 100644 molecule/gce-centos-7/tests/test_default.py diff --git a/.drone.yml b/.drone.yml index dbb7ae3..4effa97 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,10 +22,7 @@ steps: # depends_on: [ clone ] - name: molecule - image: centos:7 + image: quay.io/ansible/molecule pull: always commands: - - yum install -y epel-release - - yum install -y python-pip - - pip install ansible molecule -qq - - molecule --debug test + - molecule test --scenario-name gce-centos-7 diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..3a2255e --- /dev/null +++ b/.yamllint @@ -0,0 +1,13 @@ +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + # NOTE(retr0h): Templates no longer fail this lint rule. + # Uncomment if running old Molecule templates. + # truthy: disable diff --git a/molecule/gce-centos-7/INSTALL.rst b/molecule/gce-centos-7/INSTALL.rst new file mode 100644 index 0000000..5a135a5 --- /dev/null +++ b/molecule/gce-centos-7/INSTALL.rst @@ -0,0 +1,16 @@ +******* +Google Cloud Engine driver installation guide +******* + +Requirements +============ + +* A GCE credentials rc file +* apache-libcloud + +Install +======= + +.. code-block:: bash + + $ sudo pip install apache-libcloud diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml new file mode 100644 index 0000000..a9fc543 --- /dev/null +++ b/molecule/gce-centos-7/create.yml @@ -0,0 +1,65 @@ +--- +- name: Create + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" + vars: + ssh_port: 22 + ssh_user: "{{ lookup('env', 'USER') }}" + ssh_identity_file: "{{ lookup('env', 'HOME') }}/.ssh/google_compute_engine" + tasks: + - name: Create molecule instance(s) + gce: + instance_names: "{{ item.name }}" + zone: "{{ item.zone }}" + machine_type: "{{ item.machine_type }}" + image: "{{ item.image }}" + service_account_email: "{{ lookup('env', 'GCE_SERVICE_ACCOUNT_EMAIL') }}" + credentials_file: "{{ lookup('env', 'GCE_CREDENTIALS_FILE') }}" + project_id: "{{ lookup('env', 'GCE_PROJECT_ID') }}" + register: server + with_items: "{{ molecule_yml.platforms }}" + async: 7200 + poll: 0 + + - name: Wait for instance(s) creation to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: gce_jobs + until: gce_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config dict + set_fact: + instance_conf_dict: { + 'instance': "{{ item.instance_data[0].name }}", + 'address': "{{ item.instance_data[0].public_ip }}", + 'user': "{{ ssh_user }}", + 'port': "{{ ssh_port }}", + 'identity_file': "{{ ssh_identity_file }}", } + with_items: "{{ gce_jobs.results }}" + register: instance_config_dict + when: server.changed | bool + + - name: Convert instance config dict to a list + set_fact: + instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" + when: server.changed | bool + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool + + - name: Wait for SSH + wait_for: + port: "{{ ssh_port }}" + host: "{{ item.address }}" + search_regex: SSH + delay: 10 + with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" diff --git a/molecule/gce-centos-7/destroy.yml b/molecule/gce-centos-7/destroy.yml new file mode 100644 index 0000000..abe9cf0 --- /dev/null +++ b/molecule/gce-centos-7/destroy.yml @@ -0,0 +1,39 @@ +--- +- name: Destroy + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" + tasks: + - name: Destroy molecule instance(s) + gce: + instance_names: "{{ item.name }}" + state: absent + zone: "{{ item.zone }}" + service_account_email: "{{ lookup('env', 'GCE_SERVICE_ACCOUNT_EMAIL') }}" + credentials_file: "{{ lookup('env', 'GCE_CREDENTIALS_FILE') }}" + project_id: "{{ lookup('env', 'GCE_PROJECT_ID') }}" + register: server + with_items: "{{ molecule_yml.platforms }}" + async: 7200 + poll: 0 + + - name: Wait for instance(s) deletion to complete + async_status: + jid: "{{ item.ansible_job_id }}" + register: gce_jobs + until: gce_jobs.finished + retries: 300 + with_items: "{{ server.results }}" + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config + set_fact: + instance_conf: {} + + - name: Dump instance config + copy: + content: "{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}" + dest: "{{ molecule_instance_config }}" + when: server.changed | bool diff --git a/molecule/gce-centos-7/molecule.yml b/molecule/gce-centos-7/molecule.yml new file mode 100644 index 0000000..0249651 --- /dev/null +++ b/molecule/gce-centos-7/molecule.yml @@ -0,0 +1,23 @@ +--- +dependency: + name: galaxy +driver: + name: gce +lint: + name: yamllint + enabled: False +platforms: + - name: instance + zone: europe-north1-a + machine_type: f1-micro + image: centos-7 +provisioner: + name: ansible + lint: + name: ansible-lint +scenario: + name: gce-centos-7 +verifier: + name: testinfra + lint: + name: flake8 diff --git a/molecule/gce-centos-7/playbook.yml b/molecule/gce-centos-7/playbook.yml new file mode 100644 index 0000000..bebc4b5 --- /dev/null +++ b/molecule/gce-centos-7/playbook.yml @@ -0,0 +1,5 @@ +--- +- name: Converge + hosts: all + roles: + - role: xoxys.nginx diff --git a/molecule/gce-centos-7/prepare.yml b/molecule/gce-centos-7/prepare.yml new file mode 100644 index 0000000..ddb01fb --- /dev/null +++ b/molecule/gce-centos-7/prepare.yml @@ -0,0 +1,9 @@ +--- +- name: Prepare + hosts: all + gather_facts: false + tasks: + - name: Install python for Ansible + raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal python-zipstream) + become: true + changed_when: false diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py new file mode 100644 index 0000000..eedd64a --- /dev/null +++ b/molecule/gce-centos-7/tests/test_default.py @@ -0,0 +1,14 @@ +import os + +import testinfra.utils.ansible_runner + +testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') + + +def test_hosts_file(host): + f = host.file('/etc/hosts') + + assert f.exists + assert f.user == 'root' + assert f.group == 'root' -- 2.24.4 From abd8de1ac2a818488eb455843ef1838a453fb4ef Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 10:41:07 +0100 Subject: [PATCH 012/131] test --- .drone.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4effa97..2b116be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,4 +25,8 @@ steps: image: quay.io/ansible/molecule pull: always commands: - - molecule test --scenario-name gce-centos-7 + - molecule test + - molecule create --scenario-name gce-centos-7 + - molecule converge --scenario-name gce-centos-7 + - molecule verify --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From a04b0556342d330e73e6443afd0be8519d403861 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 10:42:09 +0100 Subject: [PATCH 013/131] test --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2b116be..fc96e4b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,7 +25,6 @@ steps: image: quay.io/ansible/molecule pull: always commands: - - molecule test - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 1e86e96230427846391477c5436a67ddca158d39 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:11:23 +0100 Subject: [PATCH 014/131] test env to file --- .drone.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index fc96e4b..2b02ef1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,7 +25,9 @@ steps: image: quay.io/ansible/molecule pull: always commands: - - molecule create --scenario-name gce-centos-7 - - molecule converge --scenario-name gce-centos-7 - - molecule verify --scenario-name gce-centos-7 - - molecule destroy --scenario-name gce-centos-7 + - echo $MY_SECRET > secret.file + - cat secret.file + # - molecule create --scenario-name gce-centos-7 + # - molecule converge --scenario-name gce-centos-7 + # - molecule verify --scenario-name gce-centos-7 + # - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From ad9db979996fe7141c5d14e89404eb8c06851ba5 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:13:13 +0100 Subject: [PATCH 015/131] test --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2b02ef1..9367db7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,8 +25,9 @@ steps: image: quay.io/ansible/molecule pull: always commands: - - echo $MY_SECRET > secret.file - - cat secret.file + - pwd + #- echo $MY_SECRET > secret.file + #- cat secret.file # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From fe3ee81180a77b8fcc376e90288c4ab228f30cac Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:14:06 +0100 Subject: [PATCH 016/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9367db7..17df551 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,8 +26,8 @@ steps: pull: always commands: - pwd - #- echo $MY_SECRET > secret.file - #- cat secret.file + - echo $MY_SECRET > /drone/src/secret.file + - cat /drone/src/secret.file # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 6b009feb7248cb429797f09bde61bfa1a4cd5b33 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:15:12 +0100 Subject: [PATCH 017/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 17df551..e534ae9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,8 +26,8 @@ steps: pull: always commands: - pwd - - echo $MY_SECRET > /drone/src/secret.file - - cat /drone/src/secret.file + - echo $MY_SECRET > test + - cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 3c6372209e389e29124dddc2abdaa16fb67bf035 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:16:04 +0100 Subject: [PATCH 018/131] test --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e534ae9..ced13d6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,8 @@ steps: # depends_on: [ clone ] - name: molecule - image: quay.io/ansible/molecule + #image: quay.io/ansible/molecule + image: alpine pull: always commands: - pwd -- 2.24.4 From 1e046068fc108f66a630bdc2c4fd6bb5849570d2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:17:40 +0100 Subject: [PATCH 019/131] test --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index ced13d6..276e622 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,8 +26,7 @@ steps: image: alpine pull: always commands: - - pwd - - echo $MY_SECRET > test + - echo "asas" > test - cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From ba32eef0d81002dc01055c6323f4bc1d80d9edd1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:18:17 +0100 Subject: [PATCH 020/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 276e622..1678311 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: image: alpine pull: always commands: - - echo "asas" > test + - echo ${MY_SECRET} > test - cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 4df8edbff9ad0dc07d7fae226a72b119ff4dbdbe Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:18:50 +0100 Subject: [PATCH 021/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1678311..c5f0251 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: image: alpine pull: always commands: - - echo ${MY_SECRET} > test + - echo $${MY_SECRET} > test - cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From a37d236500ff6f1dbb760d153103472c78d6cbaf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:19:20 +0100 Subject: [PATCH 022/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index c5f0251..6734935 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: image: alpine pull: always commands: - - echo $${MY_SECRET} > test + - echo $MY_SECRET > test - cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 596430bc9d6fa4b5857ce57d056a6ed7e22590f8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:21:12 +0100 Subject: [PATCH 023/131] test --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 6734935..fc48777 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,9 @@ steps: #image: quay.io/ansible/molecule image: alpine pull: always + environment: + MY_SECRET: + from_secret: my_secret commands: - echo $MY_SECRET > test - cat test -- 2.24.4 From 71ab06cdfd8a24d91945e8c99bac788c0a8ae969 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:22:43 +0100 Subject: [PATCH 024/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fc48777..dd1693f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,7 @@ steps: # depends_on: [ clone ] - name: molecule - #image: quay.io/ansible/molecule + image: quay.io/ansible/molecule image: alpine pull: always environment: -- 2.24.4 From 441eff9e70240d5607cc82d3aef4c0c9c308bb8a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:23:20 +0100 Subject: [PATCH 025/131] test_x --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index dd1693f..7745856 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,7 +23,7 @@ steps: - name: molecule image: quay.io/ansible/molecule - image: alpine + #image: alpine pull: always environment: MY_SECRET: -- 2.24.4 From 63bea8f8ae546bb9dd1497146a01879233522357 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:25:27 +0100 Subject: [PATCH 026/131] test_x --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7745856..9f91c4e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,8 +29,9 @@ steps: MY_SECRET: from_secret: my_secret commands: - - echo $MY_SECRET > test - - cat test + - ll + #- echo $MY_SECRET > test + #- cat test # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 2e034e510255e90bf11f6637115e225bca18ed2a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:26:13 +0100 Subject: [PATCH 027/131] test_x --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9f91c4e..84bb56e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,7 +29,7 @@ steps: MY_SECRET: from_secret: my_secret commands: - - ll + - ls -l #- echo $MY_SECRET > test #- cat test # - molecule create --scenario-name gce-centos-7 -- 2.24.4 From d4f113bbff79a5e68371989b424178b6b5a9e6e8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:26:53 +0100 Subject: [PATCH 028/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 84bb56e..6b2b75b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,6 +30,7 @@ steps: from_secret: my_secret commands: - ls -l + - cat README.md #- echo $MY_SECRET > test #- cat test # - molecule create --scenario-name gce-centos-7 -- 2.24.4 From 1089ed830eaa3318b45549fc81f3d3a10783f5dd Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:28:22 +0100 Subject: [PATCH 029/131] test_x --- .drone.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6b2b75b..196c3ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,10 +29,8 @@ steps: MY_SECRET: from_secret: my_secret commands: - - ls -l - - cat README.md - #- echo $MY_SECRET > test - #- cat test + - echo $MY_SECRET > $HOME/.ssh/google_compute_engine + - cat $HOME/.ssh/google_compute_engine # - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 545d8349cbfc6d7f2c9d40182a4c14d98a0203d2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 11:29:13 +0100 Subject: [PATCH 030/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 196c3ca..3865d50 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,6 +29,7 @@ steps: MY_SECRET: from_secret: my_secret commands: + - mkdir $HOME/.ssh - echo $MY_SECRET > $HOME/.ssh/google_compute_engine - cat $HOME/.ssh/google_compute_engine # - molecule create --scenario-name gce-centos-7 -- 2.24.4 From 427082f3cef2304196f10b9fb37c3eba293a40ec Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:04:35 +0100 Subject: [PATCH 031/131] test_x --- .drone.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3865d50..e6b5e63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,16 +23,22 @@ steps: - name: molecule image: quay.io/ansible/molecule - #image: alpine pull: always environment: - MY_SECRET: - from_secret: my_secret + GCE_SSH_KEY: + from_secret: gce_ssh_key + GCE_SERVICE_ACCOUNT_EMAIL: + from_secret: gce_service_account_email + GCE_PROJECT_ID: + from_secret: gce_project_id + GCE_CREDENTIALS_JSON: + from_secret: gce_credentials_json + GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json commands: - mkdir $HOME/.ssh - - echo $MY_SECRET > $HOME/.ssh/google_compute_engine - - cat $HOME/.ssh/google_compute_engine - # - molecule create --scenario-name gce-centos-7 + - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine + - echo $GCE_CREDENTIAL_JSON > $GCE_CREDENTIALS_FILE + - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 - # - molecule destroy --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 2927f6a261374dce8d1927de405001c82b9e7891 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:05:45 +0100 Subject: [PATCH 032/131] test_x --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e6b5e63..d15f316 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,7 +37,7 @@ steps: commands: - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - - echo $GCE_CREDENTIAL_JSON > $GCE_CREDENTIALS_FILE + - echo $GCE_CREDENTIAL_JSON > $HOME/ansible-testing.json - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From d5e9b9e32ccf315aa15aca70e0bc60526d4a8242 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:14:56 +0100 Subject: [PATCH 033/131] test_x --- molecule/gce-centos-7/create.yml | 2 +- molecule/gce-centos-7/molecule.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index a9fc543..3dda1f2 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -3,7 +3,7 @@ hosts: localhost connection: local gather_facts: false - no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" + #no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" vars: ssh_port: 22 ssh_user: "{{ lookup('env', 'USER') }}" diff --git a/molecule/gce-centos-7/molecule.yml b/molecule/gce-centos-7/molecule.yml index 0249651..e65da98 100644 --- a/molecule/gce-centos-7/molecule.yml +++ b/molecule/gce-centos-7/molecule.yml @@ -7,7 +7,7 @@ lint: name: yamllint enabled: False platforms: - - name: instance + - name: gce-centos-7 zone: europe-north1-a machine_type: f1-micro image: centos-7 -- 2.24.4 From c7df93459e6a7f8e4f2f92ca5dd521726e01c61e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:20:25 +0100 Subject: [PATCH 034/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index d15f316..2726ccc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,6 +38,7 @@ steps: - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - echo $GCE_CREDENTIAL_JSON > $HOME/ansible-testing.json + - pip install apache-libcloud --user - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From ae7d54a47fe43705b172702b986925872d24dbd1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:24:06 +0100 Subject: [PATCH 035/131] test_x --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2726ccc..dbb882c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,7 +37,7 @@ steps: commands: - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - - echo $GCE_CREDENTIAL_JSON > $HOME/ansible-testing.json + - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json - pip install apache-libcloud --user - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 9d0c7f916c4253b278234c60848f8f04aab9224b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 12:25:48 +0100 Subject: [PATCH 036/131] test_x --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index dbb882c..41edb4a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,7 +38,7 @@ steps: - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json - - pip install apache-libcloud --user + - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 # - molecule converge --scenario-name gce-centos-7 # - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From fd374181b2069c06c640399530801695eab7bf20 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 13:54:45 +0100 Subject: [PATCH 037/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 41edb4a..9c9b467 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,6 +37,7 @@ steps: commands: - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine + - chmod 600 $HOME/.ssh/google_compute_engine - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 -- 2.24.4 From 083282b117c4eb86e02b34fb654ad88129098606 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 14:06:42 +0100 Subject: [PATCH 038/131] test_x --- .drone.yml | 2 ++ molecule/gce-centos-7/create.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9c9b467..0dadf61 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,6 +33,8 @@ steps: from_secret: gce_project_id GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json + GCE_SSH_USER: + from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json commands: - mkdir $HOME/.ssh diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index 3dda1f2..3f4bc6c 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -6,7 +6,7 @@ #no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}" vars: ssh_port: 22 - ssh_user: "{{ lookup('env', 'USER') }}" + ssh_user: "{{ lookup('env', 'GCE_SSH_USER') }}" ssh_identity_file: "{{ lookup('env', 'HOME') }}/.ssh/google_compute_engine" tasks: - name: Create molecule instance(s) -- 2.24.4 From 404fd8c8f44a5ec1fa4188d5d7e3e95bcf9a0efb Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 14:29:46 +0100 Subject: [PATCH 039/131] test_x --- .drone.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0dadf61..0244916 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,12 +37,14 @@ steps: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json commands: + - apk add vim - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine - - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json - - pip install apache-libcloud pycrypto --user - - molecule create --scenario-name gce-centos-7 - # - molecule converge --scenario-name gce-centos-7 - # - molecule verify --scenario-name gce-centos-7 - - molecule destroy --scenario-name gce-centos-7 + - xxd $HOME/.ssh/google_compute_engine + # - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json + # - pip install apache-libcloud pycrypto --user + # - molecule create --scenario-name gce-centos-7 + # # - molecule converge --scenario-name gce-centos-7 + # # - molecule verify --scenario-name gce-centos-7 + # - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 18d66461f4fa148f0166b53dfef46fdf479cf331 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 14:30:53 +0100 Subject: [PATCH 040/131] test_x --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0244916..9c4a025 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,7 +37,6 @@ steps: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json commands: - - apk add vim - mkdir $HOME/.ssh - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From a86dc697d7214b9846c4b3595a3b7cd0d3254e66 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 14:42:23 +0100 Subject: [PATCH 041/131] test_x --- .drone.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9c4a025..dddbe0f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,12 +38,11 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json commands: - mkdir $HOME/.ssh - - echo $GCE_SSH_KEY > $HOME/.ssh/google_compute_engine + - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine - - xxd $HOME/.ssh/google_compute_engine - # - echo $GCE_CREDENTIALS_JSON > $HOME/ansible-testing.json - # - pip install apache-libcloud pycrypto --user - # - molecule create --scenario-name gce-centos-7 - # # - molecule converge --scenario-name gce-centos-7 - # # - molecule verify --scenario-name gce-centos-7 - # - molecule destroy --scenario-name gce-centos-7 + - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + - pip install apache-libcloud pycrypto --user + - molecule create --scenario-name gce-centos-7 + # - molecule converge --scenario-name gce-centos-7 + # - molecule verify --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 74bc6ccb59c998b87ade3044448e31989622908e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 15:16:10 +0100 Subject: [PATCH 042/131] test_x --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index dddbe0f..61a0bce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,6 +43,6 @@ steps: - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 - # - molecule converge --scenario-name gce-centos-7 - # - molecule verify --scenario-name gce-centos-7 + - molecule converge --scenario-name gce-centos-7 + - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 9a668be4b3fb2d64d923a61a37fa1d2aebcf0200 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 15:22:45 +0100 Subject: [PATCH 043/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 61a0bce..dbc9886 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,6 +36,7 @@ steps: GCE_SSH_USER: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + DEFAULT_TIMEOUT: 60 commands: - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine -- 2.24.4 From afbfc65c78ab600ae18a79d32ac5bdb8973f8a5e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:18:08 +0100 Subject: [PATCH 044/131] test_x --- .drone.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index dbc9886..ae3dbea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,14 +36,16 @@ steps: GCE_SSH_USER: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json - DEFAULT_TIMEOUT: 60 + ANSIBLE_TIMEOUT: 60 commands: - - mkdir $HOME/.ssh - - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - - chmod 600 $HOME/.ssh/google_compute_engine - - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - - pip install apache-libcloud pycrypto --user - - molecule create --scenario-name gce-centos-7 - - molecule converge --scenario-name gce-centos-7 - - molecule verify --scenario-name gce-centos-7 - - molecule destroy --scenario-name gce-centos-7 + - pwd + - ls -la + # - mkdir $HOME/.ssh + # - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine + # - chmod 600 $HOME/.ssh/google_compute_engine + # - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + # - pip install apache-libcloud pycrypto --user + # - molecule create --scenario-name gce-centos-7 + # - molecule converge --scenario-name gce-centos-7 + # - molecule verify --scenario-name gce-centos-7 + # - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 8b8182514e323d2a3309b5b3c9bfae572f06d40c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:29:57 +0100 Subject: [PATCH 045/131] test_x --- .drone.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.drone.yml b/.drone.yml index ae3dbea..a0551c0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,12 @@ kind: pipeline name: default + +clone: + git: + image: plugins/git + path: /drone/src/$DRONE_REPO_NAME + steps: # - name: ansible-latest # image: python:2.7 -- 2.24.4 From b75822f90c18f670c0788dbf245ccaca87dfdc06 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:33:22 +0100 Subject: [PATCH 046/131] test_x --- .drone.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index a0551c0..83ec3f7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,9 +4,7 @@ name: default clone: - git: - image: plugins/git - path: /drone/src/$DRONE_REPO_NAME + path: /drone/src/xxxxx steps: # - name: ansible-latest -- 2.24.4 From 2396c0c45749428ef4f19069fe5512ab56a0593f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:34:56 +0100 Subject: [PATCH 047/131] test_x --- .drone.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 83ec3f7..fab34dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,9 +4,15 @@ name: default clone: - path: /drone/src/xxxxx + disable: true steps: +- name: clone + image: docker:git + commands: + - git clone $DRONE_GIT_HTTP_URL + - git checkout $DRONE_COMMIT + # - name: ansible-latest # image: python:2.7 # pull: always -- 2.24.4 From 9b1928d9cc77d5728c6e6d8289247be6b050b7ce Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:35:54 +0100 Subject: [PATCH 048/131] test_x --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index fab34dc..e18d40a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,11 +7,11 @@ clone: disable: true steps: -- name: clone - image: docker:git - commands: - - git clone $DRONE_GIT_HTTP_URL - - git checkout $DRONE_COMMIT + - name: clone + image: docker:git + commands: + - git clone $DRONE_GIT_HTTP_URL + - git checkout $DRONE_COMMIT # - name: ansible-latest # image: python:2.7 -- 2.24.4 From c81764fc9284734c463b8727c7f1fff969f84820 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 16:37:35 +0100 Subject: [PATCH 049/131] test_x --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index e18d40a..e979fe2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,6 +11,7 @@ steps: image: docker:git commands: - git clone $DRONE_GIT_HTTP_URL + - cd $DRONE_REPO_NAME - git checkout $DRONE_COMMIT # - name: ansible-latest -- 2.24.4 From 082102aadc12f0722995bd75171940a50eacb025 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:40:18 +0100 Subject: [PATCH 050/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e979fe2..23973a7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,7 +12,7 @@ steps: commands: - git clone $DRONE_GIT_HTTP_URL - cd $DRONE_REPO_NAME - - git checkout $DRONE_COMMIT + - git checkout $DRONE_COMMIT -b molecule-dev # - name: ansible-latest # image: python:2.7 -- 2.24.4 From e1701584a7c57336c484d6e40c130a04bf265262 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:42:10 +0100 Subject: [PATCH 051/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 23973a7..df25497 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,7 +12,7 @@ steps: commands: - git clone $DRONE_GIT_HTTP_URL - cd $DRONE_REPO_NAME - - git checkout $DRONE_COMMIT -b molecule-dev + - git checkout $DRONE_COMMIT -b $DRONE_BRANCH # - name: ansible-latest # image: python:2.7 -- 2.24.4 From e17d7115962590a58cc25e7e05256c394256fd8d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:46:32 +0100 Subject: [PATCH 052/131] try workspace again --- .drone.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index df25497..eb2d98f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,17 +2,20 @@ kind: pipeline name: default +workspace: + base: /drone/src + path: xxxxx -clone: - disable: true +# clone: +# disable: true -steps: - - name: clone - image: docker:git - commands: - - git clone $DRONE_GIT_HTTP_URL - - cd $DRONE_REPO_NAME - - git checkout $DRONE_COMMIT -b $DRONE_BRANCH +# steps: +# - name: clone +# image: docker:git +# commands: +# - git clone $DRONE_GIT_HTTP_URL +# - cd $DRONE_REPO_NAME +# - git checkout $DRONE_COMMIT -b $DRONE_BRANCH # - name: ansible-latest # image: python:2.7 -- 2.24.4 From 55614b55483ae7b712226454550e0c6df6a49cab Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:47:08 +0100 Subject: [PATCH 053/131] fix syntax error --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index eb2d98f..519ebc7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ workspace: # clone: # disable: true -# steps: +steps: # - name: clone # image: docker:git # commands: -- 2.24.4 From a1888e7dd9c8cbafac7b8993569ecb5d9b75beda Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:48:16 +0100 Subject: [PATCH 054/131] add dynamc repo name to workspace --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 519ebc7..6428e11 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: default workspace: base: /drone/src - path: xxxxx + path: $DRONE_REPO_NAME # clone: # disable: true -- 2.24.4 From 7424d311d806f0423117a68bc6218a3bc416abd9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:49:13 +0100 Subject: [PATCH 055/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6428e11..7284d41 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: default workspace: base: /drone/src - path: $DRONE_REPO_NAME + path: $${DRONE_REPO_NAME} # clone: # disable: true -- 2.24.4 From ec607776e3db9d6911bac88fccf1717685d99b77 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:49:59 +0100 Subject: [PATCH 056/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7284d41..25c5f58 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,8 +3,8 @@ kind: pipeline name: default workspace: - base: /drone/src - path: $${DRONE_REPO_NAME} + base: /drone/src/$DRONE_REPO_NAME + path: test # clone: # disable: true -- 2.24.4 From 55d5196ab883575a31281cdc9094ec28164da7a9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 22:53:45 +0100 Subject: [PATCH 057/131] test --- .drone.yml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.drone.yml b/.drone.yml index 25c5f58..698b087 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,20 +3,10 @@ kind: pipeline name: default workspace: - base: /drone/src/$DRONE_REPO_NAME - path: test - -# clone: -# disable: true + base: /drone/src + path: xoxys.nginx steps: -# - name: clone -# image: docker:git -# commands: -# - git clone $DRONE_GIT_HTTP_URL -# - cd $DRONE_REPO_NAME -# - git checkout $DRONE_COMMIT -b $DRONE_BRANCH - # - name: ansible-latest # image: python:2.7 # pull: always @@ -51,15 +41,16 @@ steps: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json ANSIBLE_TIMEOUT: 60 + ANSIBLE_ROLES_PATH: /drone/src commands: - pwd - ls -la - # - mkdir $HOME/.ssh - # - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - # - chmod 600 $HOME/.ssh/google_compute_engine - # - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - # - pip install apache-libcloud pycrypto --user - # - molecule create --scenario-name gce-centos-7 - # - molecule converge --scenario-name gce-centos-7 - # - molecule verify --scenario-name gce-centos-7 - # - molecule destroy --scenario-name gce-centos-7 + - mkdir $HOME/.ssh + - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine + - chmod 600 $HOME/.ssh/google_compute_engine + - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + - pip install apache-libcloud pycrypto --user + - molecule create --scenario-name gce-centos-7 + - molecule converge --scenario-name gce-centos-7 + - molecule verify --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From c2cb61c890e8b5051fc25cb397e1fb9dbcd41196 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:09:11 +0100 Subject: [PATCH 058/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 698b087..b305d65 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,9 +42,9 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src + ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - pwd - - ls -la + - git clone https://gitea.rknet.org/ansible/custom_modules - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 559186671f749ddc3783452d67658549cf01cf20 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:10:25 +0100 Subject: [PATCH 059/131] test --- .drone.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b305d65..8f29432 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,11 @@ steps: # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini # depends_on: [ clone ] + - name: dependencies + image: docker:git + commands: + - git clone https://gitea.rknet.org/ansible/custom_modules + - name: molecule image: quay.io/ansible/molecule pull: always @@ -44,7 +49,6 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - git clone https://gitea.rknet.org/ansible/custom_modules - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From b8c3db45e01ec9037005079635e843370443784b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:12:04 +0100 Subject: [PATCH 060/131] test --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 8f29432..8ef69d1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,6 +49,7 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: + - ls -l /drone/src/custom_modules - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 343c8b3348cbe4b230a45964ea39190aa6e66489 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:13:03 +0100 Subject: [PATCH 061/131] test --- .drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8ef69d1..698db74 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,9 @@ steps: - name: dependencies image: docker:git commands: + - pwd - git clone https://gitea.rknet.org/ansible/custom_modules + - ls -l - name: molecule image: quay.io/ansible/molecule @@ -49,7 +51,7 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - ls -l /drone/src/custom_modules + - ls -l - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 6e0c7e6eafb0e52de02a1c52ba40a3b6327cc440 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:15:12 +0100 Subject: [PATCH 062/131] test --- .drone.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 698db74..25f9d54 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,9 +28,7 @@ steps: - name: dependencies image: docker:git commands: - - pwd - - git clone https://gitea.rknet.org/ansible/custom_modules - - ls -l + - git clone https://gitea.rknet.org/ansible/custom_modules /drone/src/custom_modules - name: molecule image: quay.io/ansible/molecule @@ -51,7 +49,6 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - ls -l - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From d81a34a5ffa439429c731102ffa91006278a50bd Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:16:29 +0100 Subject: [PATCH 063/131] test --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 25f9d54..60687b3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,6 +49,7 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: + - ls -l /drone/src/custom_modules - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From fe27cf3deeea84b6b2ddd4c9ab2155f1043548c7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:21:37 +0100 Subject: [PATCH 064/131] test --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 60687b3..0c101b1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -50,6 +50,7 @@ steps: ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - ls -l /drone/src/custom_modules + - echo "$ANSIBLE_LIBRARY" - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 0acf9680cddd1d84e7f45e840a5bd16327157986 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:23:07 +0100 Subject: [PATCH 065/131] test --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0c101b1..8ecabc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,8 +49,7 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - ls -l /drone/src/custom_modules - - echo "$ANSIBLE_LIBRARY" + - ansible --version - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 8f7bf5ee3f38c1d32438fec270750d2b96a21cb2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:25:46 +0100 Subject: [PATCH 066/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8ecabc4..6a8b874 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,13 +49,13 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_LIBRARY: /drone/src/custom_modules commands: - - ansible --version - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 + - ansible --version - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From d2ff1df8298c08e8f0cd69d523ef5b17c4fbf834 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 27 Feb 2019 23:36:37 +0100 Subject: [PATCH 067/131] test --- .drone.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6a8b874..28fc67b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,11 +25,6 @@ steps: # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini # depends_on: [ clone ] - - name: dependencies - image: docker:git - commands: - - git clone https://gitea.rknet.org/ansible/custom_modules /drone/src/custom_modules - - name: molecule image: quay.io/ansible/molecule pull: always @@ -47,8 +42,9 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src - ANSIBLE_LIBRARY: /drone/src/custom_modules + ANSIBLE_LIBRARY: $HOME/custom_modules commands: + - git clone https://gitea.rknet.org/ansible/custom_modules $HOME/custom_modules - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine -- 2.24.4 From 00771b294a0864f7555730ea9768f3935863f352 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 08:43:50 +0100 Subject: [PATCH 068/131] test local modules --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 28fc67b..62b09f8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,16 +42,16 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src - ANSIBLE_LIBRARY: $HOME/custom_modules commands: - - git clone https://gitea.rknet.org/ansible/custom_modules $HOME/custom_modules + - mkdir -p $HOME/.ansible/plugins/modules/ + - git clone https://gitea.rknet.org/ansible/custom_modules $HOME/.ansible/plugins/modules/ + - ansible-doc -t module iptables_raw - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 - - ansible --version - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 -- 2.24.4 From 27105bb2df6839bad893f97dbd4252994e1d527d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 09:01:25 +0100 Subject: [PATCH 069/131] clone custom modules into role --- .drone.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 62b09f8..3262196 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,13 @@ steps: # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini # depends_on: [ clone ] + - name: dependencies + image: docker:git + commands: + - pwd + - mkdir -p ./library/ + - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ + - name: molecule image: quay.io/ansible/molecule pull: always @@ -43,8 +50,6 @@ steps: ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src commands: - - mkdir -p $HOME/.ansible/plugins/modules/ - - git clone https://gitea.rknet.org/ansible/custom_modules $HOME/.ansible/plugins/modules/ - ansible-doc -t module iptables_raw - mkdir $HOME/.ssh - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine -- 2.24.4 From 2a86a0a84fb1314667cc5f3fc612b202989adef9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 09:07:14 +0100 Subject: [PATCH 070/131] produce a testinfra failure --- molecule/gce-centos-7/tests/test_default.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index eedd64a..4ba906b 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -11,4 +11,4 @@ def test_hosts_file(host): assert f.exists assert f.user == 'root' - assert f.group == 'root' + assert f.group == 'xxx' -- 2.24.4 From 5ff10d4f0967bb0d687171e4c7eb01747171c47e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 10:00:08 +0100 Subject: [PATCH 071/131] add basic nginx checks; renovate ansible syntax --- defaults/main.yml | 9 ++------- molecule/gce-centos-7/INSTALL.rst | 16 ---------------- molecule/gce-centos-7/tests/test_default.py | 12 +++++++----- tasks/install.yml | 6 +++--- tasks/tls.yml | 17 ++--------------- 5 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 molecule/gce-centos-7/INSTALL.rst diff --git a/defaults/main.yml b/defaults/main.yml index 31dbce4..17f11ac 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -48,15 +48,10 @@ nginx_open_ports: - 443 nginx_tls_enabled: False -# You can deploy your certificates from a file or from content. -# If you enable nginx_tls_source_use_content you have to put the content of your cert files into -# nginx_tls_cert_file and nginx_tls_cert_file. -nginx_tls_source_use_content: False -# If you enable nginx_tls_source_use_files theses variables have to contain the path to your -# certificate files located on the ansible "master" host -nginx_tls_source_use_files: True +# Source has to be a file nginx_tls_cert_source: mycert.pem nginx_tls_key_source: mykey.pem +# Set the destination filename nginx_tls_cert_file: mycert.pem nginx_tls_key_file: mykey.pem # nginx_tls_dhparam_file: # defaults to not set diff --git a/molecule/gce-centos-7/INSTALL.rst b/molecule/gce-centos-7/INSTALL.rst deleted file mode 100644 index 5a135a5..0000000 --- a/molecule/gce-centos-7/INSTALL.rst +++ /dev/null @@ -1,16 +0,0 @@ -******* -Google Cloud Engine driver installation guide -******* - -Requirements -============ - -* A GCE credentials rc file -* apache-libcloud - -Install -======= - -.. code-block:: bash - - $ sudo pip install apache-libcloud diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 4ba906b..d64a9ef 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -6,9 +6,11 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') -def test_hosts_file(host): - f = host.file('/etc/hosts') +def test_nginx_is_installed(host): + nginx = host.package("nginx") + assert nginx.is_installed - assert f.exists - assert f.user == 'root' - assert f.group == 'xxx' +def test_nginx_running_and_enabled(host): + nginx = host.service("nginx") + assert nginx.is_running + assert nginx.is_enabled diff --git a/tasks/install.yml b/tasks/install.yml index 280344d..d385b8a 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -36,7 +36,7 @@ owner: "{{ nginx_user }}" group: "{{ nginx_group }}" mode: 0750 - with_items: + loop: - "{{ nginx_vhosts_dir }}" - "{{ nginx_vhosts_dir }}/default" @@ -47,7 +47,7 @@ owner: root group: root mode: 0640 - with_items: + loop: - /etc/nginx/sites-available - /etc/nginx/sites-enabled @@ -88,7 +88,7 @@ name: "{{ item.name }}" state: "{{ item.state }}" persistent: "{{ item.persistent }}" - with_items: "{{ nginx_set_sebooleans }}" + loop: "{{ nginx_set_sebooleans }}" when: nginx_set_sebooleans is defined - name: Fix selinux file context mappaing for pid file diff --git a/tasks/tls.yml b/tasks/tls.yml index 6b8ec18..7b20bee 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -1,24 +1,11 @@ --- - block: - - name: Copy certs and private key (content) - copy: - content: "{{ item.src }}" - dest: "{{ item.dest }}" - mode: "{{ item.mode }}" - with_items: - - { src: "{{ nginx_tls_key_source }}", dest: '/etc/pki/tls/private/{{ nginx_tls_key_file }}', mode: '0600' } - - { src: "{{ nginx_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ nginx_tls_cert_file }}', mode: '0750' } - loop_control: - label: "{{ item.dest }}" - notify: __nginx_reload - when: nginx_tls_source_use_content - - - name: Copy certs and private key (files) + - name: Copy certs and private key copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode }}" - with_items: + loop: - { src: "{{ nginx_tls_key_source }}", dest: '/etc/pki/tls/private/{{ nginx_tls_key_file }}', mode: '0600' } - { src: "{{ nginx_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ nginx_tls_cert_file }}', mode: '0750' } loop_control: -- 2.24.4 From f5309db299fe51d55cee1e168179008e8304c75f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 11:27:56 +0100 Subject: [PATCH 072/131] test with custom molecule image --- .drone.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3262196..4e110b3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,15 +25,8 @@ steps: # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini # depends_on: [ clone ] - - name: dependencies - image: docker:git - commands: - - pwd - - mkdir -p ./library/ - - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - - name: molecule - image: quay.io/ansible/molecule + image: xoxys/molecule:gce pull: always environment: GCE_SSH_KEY: @@ -50,12 +43,11 @@ steps: ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src commands: - - ansible-doc -t module iptables_raw - - mkdir $HOME/.ssh + - mkdir ./library/ + - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - chmod 600 $HOME/.ssh/google_compute_engine - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - - pip install apache-libcloud pycrypto --user - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 44fe3fc6b0c5c50c884bfdcca64c0f89ba1f0b11 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:22:58 +0100 Subject: [PATCH 073/131] better test output --- molecule/gce-centos-7/create.yml | 8 ++++++++ molecule/gce-centos-7/tests/test_default.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index 3f4bc6c..c9e316a 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -20,6 +20,8 @@ project_id: "{{ lookup('env', 'GCE_PROJECT_ID') }}" register: server with_items: "{{ molecule_yml.platforms }}" + loop_control: + label: "{{ item.name }} - {{ item.machine_type }}" async: 7200 poll: 0 @@ -30,6 +32,8 @@ until: gce_jobs.finished retries: 300 with_items: "{{ server.results }}" + loop_control: + label: "{{ item.name }} - {{ item.machine_type }}" # Mandatory configuration for Molecule to function. @@ -42,6 +46,8 @@ 'port': "{{ ssh_port }}", 'identity_file': "{{ ssh_identity_file }}", } with_items: "{{ gce_jobs.results }}" + loop_control: + label: "{{ item.instance_data[0].name }} - {{ item.instance_data[0].machine_type }}" register: instance_config_dict when: server.changed | bool @@ -63,3 +69,5 @@ search_regex: SSH delay: 10 with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + loop_control: + label: "{{ item.instance }}" diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index d64a9ef..45ddb66 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -2,6 +2,9 @@ import os import testinfra.utils.ansible_runner +import warnings +warnings.filterwarnings("ignore", category=DeprecationWarning) + testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') -- 2.24.4 From d9c1691157031a020f9b73a7cfb29bd193f58ad0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:28:19 +0100 Subject: [PATCH 074/131] fix loop control --- molecule/gce-centos-7/create.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index c9e316a..c9d603a 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -21,7 +21,7 @@ register: server with_items: "{{ molecule_yml.platforms }}" loop_control: - label: "{{ item.name }} - {{ item.machine_type }}" + label: "{{ item.name }}:{{ item.machine_type }}" async: 7200 poll: 0 @@ -33,7 +33,7 @@ retries: 300 with_items: "{{ server.results }}" loop_control: - label: "{{ item.name }} - {{ item.machine_type }}" + label: "{{ item.item.name }}:{{ item.item.machine_type }}" # Mandatory configuration for Molecule to function. -- 2.24.4 From 1582ba9723a105366c8835e7510aba58bb748aec Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:38:25 +0100 Subject: [PATCH 075/131] try pytest.ini --- molecule/gce-centos-7/create.yml | 2 +- pytest.ini | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 pytest.ini diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index c9d603a..6fbb72e 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -47,7 +47,7 @@ 'identity_file': "{{ ssh_identity_file }}", } with_items: "{{ gce_jobs.results }}" loop_control: - label: "{{ item.instance_data[0].name }} - {{ item.instance_data[0].machine_type }}" + label: "{{ item.instance_data[0].name }}:{{ item.instance_data[0].machine_type }}" register: instance_config_dict when: server.changed | bool diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..5cf23b3 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +filterwarnings = + ignore:Using.*the ABCs.*:DeprecationWarning + ignore:You passed a bytestring as.*:DeprecationWarning -- 2.24.4 From 77fcbabcc69416f758bd81e7f32a440332b14ec8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:43:31 +0100 Subject: [PATCH 076/131] disable all deprecation warnings in pytest --- pytest.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 5cf23b3..c24fe5b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,3 @@ [pytest] filterwarnings = - ignore:Using.*the ABCs.*:DeprecationWarning - ignore:You passed a bytestring as.*:DeprecationWarning + ignore::DeprecationWarning -- 2.24.4 From 8e12c1f5d1a24e44a98ac43fe2c4f98ef966884d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:57:50 +0100 Subject: [PATCH 077/131] try to get colored output --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 4e110b3..c2c1144 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,6 +42,7 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src + ANSIBLE_FORCE_COLOR: true commands: - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ -- 2.24.4 From 3e1740a3ad31516841f8ee087f45415ffb7d93eb Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 14:07:13 +0100 Subject: [PATCH 078/131] test --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index c2c1144..150493a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -44,6 +44,7 @@ steps: ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_FORCE_COLOR: true commands: + - echo $DRONE_LOGS_COLOR - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine -- 2.24.4 From 2206b321c86860175a49d619ad2dc2be7835e667 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 14:20:22 +0100 Subject: [PATCH 079/131] colors --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 150493a..a0e7af0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,8 +43,8 @@ steps: ANSIBLE_TIMEOUT: 60 ANSIBLE_ROLES_PATH: /drone/src ANSIBLE_FORCE_COLOR: true + CLICOLOR_FORCE: 1 commands: - - echo $DRONE_LOGS_COLOR - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine -- 2.24.4 From 6c07db54a12b6f1d39a478c53cec39b6bfbb2f67 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 14:34:38 +0100 Subject: [PATCH 080/131] test --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index a0e7af0..6fc223d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -45,6 +45,7 @@ steps: ANSIBLE_FORCE_COLOR: true CLICOLOR_FORCE: 1 commands: + - echo -e "\033[0;31mred\033[0m" - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine -- 2.24.4 From 5808da08834c6e9bd5693ee99b416bdc8ab85685 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 14:53:50 +0100 Subject: [PATCH 081/131] test molecule ansible config --- .drone.yml | 3 --- molecule/gce-centos-7/molecule.yml | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6fc223d..b41b36b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,9 +40,6 @@ steps: GCE_SSH_USER: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json - ANSIBLE_TIMEOUT: 60 - ANSIBLE_ROLES_PATH: /drone/src - ANSIBLE_FORCE_COLOR: true CLICOLOR_FORCE: 1 commands: - echo -e "\033[0;31mred\033[0m" diff --git a/molecule/gce-centos-7/molecule.yml b/molecule/gce-centos-7/molecule.yml index e65da98..d94759c 100644 --- a/molecule/gce-centos-7/molecule.yml +++ b/molecule/gce-centos-7/molecule.yml @@ -21,3 +21,8 @@ verifier: name: testinfra lint: name: flake8 +ansible: + raw_env_vars: + ANSIBLE_TIMEOUT: 60 + ANSIBLE_ROLES_PATH: /drone/src + ANSIBLE_FORCE_COLOR: true -- 2.24.4 From aae355876ee0789cf7de4075da4f31bc8366b5d4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 14:57:57 +0100 Subject: [PATCH 082/131] test color --- .drone.yml | 1 - molecule/gce-centos-7/molecule.yml | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index b41b36b..977a890 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,7 +42,6 @@ steps: GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json CLICOLOR_FORCE: 1 commands: - - echo -e "\033[0;31mred\033[0m" - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine diff --git a/molecule/gce-centos-7/molecule.yml b/molecule/gce-centos-7/molecule.yml index d94759c..d0a43fc 100644 --- a/molecule/gce-centos-7/molecule.yml +++ b/molecule/gce-centos-7/molecule.yml @@ -24,5 +24,7 @@ verifier: ansible: raw_env_vars: ANSIBLE_TIMEOUT: 60 - ANSIBLE_ROLES_PATH: /drone/src - ANSIBLE_FORCE_COLOR: true + ansiblecfg_defaults: + force_color: true + nocolor: false + roles_path: /drone/src -- 2.24.4 From 2f16aa48bf14d1bdb9b9aa5edb68c683cf8e5117 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 20:49:02 +0100 Subject: [PATCH 083/131] test --- .drone.yml | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 977a890..add6aec 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,23 +7,28 @@ workspace: path: xoxys.nginx steps: - # - name: ansible-latest - # image: python:2.7 - # pull: always - # commands: - # - pip install ansible ansible-later -q - # - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini - # depends_on: [ clone ] + - name: ansible-latest + image: python:2.7 + pull: always + environment: + PY_COLORS: 1 + commands: + - pip install ansible ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + depends_on: [ clone ] - # - name: ansible-master - # image: python:2.7 - # pull: always - # commands: - # - pip install ansible ansible-later -q - # - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - # - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini - # depends_on: [ clone ] + - name: ansible-master + image: python:2.7 + pull: always + environment: + PY_COLORS: 1 + commands: + - pip install git+https://github.com/ansible/ansible.git@devel -qq + - pip install ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + depends_on: [ clone ] - name: molecule image: xoxys/molecule:gce @@ -40,7 +45,7 @@ steps: GCE_SSH_USER: from_secret: gce_ssh_user GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json - CLICOLOR_FORCE: 1 + PY_COLORS: 1 commands: - mkdir ./library/ - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ -- 2.24.4 From 6f63cdbffd13e70ea61dfafb80292ab34bf88cd6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 21:22:49 +0100 Subject: [PATCH 084/131] exclude new files --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index add6aec..4c9c9c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,7 +15,7 @@ steps: commands: - pip install ansible ansible-later -qq - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini depends_on: [ clone ] - name: ansible-master @@ -27,7 +27,7 @@ steps: - pip install git+https://github.com/ansible/ansible.git@devel -qq - pip install ansible-later -qq - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini + - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini depends_on: [ clone ] - name: molecule -- 2.24.4 From 40fbe6a66f265c12c7ab20aa8638fe6ad380a5fe Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 1 Mar 2019 11:48:32 +0100 Subject: [PATCH 085/131] switch to jsonnet --- .drone.1.yml | 58 ++++++++++++++++ .drone.jsonnet | 90 +++++++++++++++++++++++++ .drone.yml | 103 +++++++++++++++-------------- .yamllint | 13 ---- molecule/gce-centos-7/molecule.yml | 4 +- pytest.ini => molecule/pytest.ini | 0 6 files changed, 204 insertions(+), 64 deletions(-) create mode 100644 .drone.1.yml create mode 100644 .drone.jsonnet delete mode 100644 .yamllint rename pytest.ini => molecule/pytest.ini (100%) diff --git a/.drone.1.yml b/.drone.1.yml new file mode 100644 index 0000000..4c9c9c6 --- /dev/null +++ b/.drone.1.yml @@ -0,0 +1,58 @@ +--- +kind: pipeline +name: default + +workspace: + base: /drone/src + path: xoxys.nginx + +steps: + - name: ansible-latest + image: python:2.7 + pull: always + environment: + PY_COLORS: 1 + commands: + - pip install ansible ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini + depends_on: [ clone ] + + - name: ansible-master + image: python:2.7 + pull: always + environment: + PY_COLORS: 1 + commands: + - pip install git+https://github.com/ansible/ansible.git@devel -qq + - pip install ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini + depends_on: [ clone ] + + - name: molecule + image: xoxys/molecule:gce + pull: always + environment: + GCE_SSH_KEY: + from_secret: gce_ssh_key + GCE_SERVICE_ACCOUNT_EMAIL: + from_secret: gce_service_account_email + GCE_PROJECT_ID: + from_secret: gce_project_id + GCE_CREDENTIALS_JSON: + from_secret: gce_credentials_json + GCE_SSH_USER: + from_secret: gce_ssh_user + GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + PY_COLORS: 1 + commands: + - mkdir ./library/ + - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ + - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine + - chmod 600 $HOME/.ssh/google_compute_engine + - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + - molecule create --scenario-name gce-centos-7 + - molecule converge --scenario-name gce-centos-7 + - molecule verify --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..35e280b --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,90 @@ +local AnsibleVersions(version="latest", package="ansible") = { + name: "ansible-" + version, + image: "python:3.7", + pull: "always", + environment: { + PY_COLORS: 1 + }, + commands: [ + "pip install " + package + " ansible-later -qq", + "git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy", + "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + ], + depends_on: [ + "clone", + ], +}; + +local PipelineTesting = { + kind: "pipeline", + name: "testing", + platform: { + os: "linux", + arch: "amd64", + }, + workspace: { + base: "/drone/src", + path: "xoxys.nginx" + }, + steps: [ + AnsibleVersions(version="latest", package="ansible"), + AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), + { + name: "molecule", + image: "xoxys/molecule:gce", + pull: "always", + environment: { + GCE_SSH_KEY: { "from_secret": "gce_ssh_key" }, + GCE_SERVICE_ACCOUNT_EMAIL: { "from_secret": "gce_service_account_email" }, + GCE_PROJECT_ID: { "from_secret": "gce_project_id" }, + GCE_CREDENTIALS_JSON: { "from_secret": "gce_credentials_json" }, + GCE_SSH_USER: { "from_secret": "gce_ssh_user" }, + GCE_CREDENTIALS_FILE: "$HOME/ansible-testing.json", + PY_COLORS: 1 + }, + commands: [ + "mkdir ./library/", + "git clone https://gitea.rknet.org/ansible/custom_modules ./library/", + "echo \"$GCE_SSH_KEY\" > $HOME/.ssh/google_compute_engine", + "chmod 600 $HOME/.ssh/google_compute_engine", + "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json", + "molecule create --scenario-name gce-centos-7", + "molecule converge --scenario-name gce-centos-7", + "molecule verify --scenario-name gce-centos-7", + "molecule destroy --scenario-name gce-centos-7", + ], + }, + ], +}; + +local PipelineNotifications = { + kind: "pipeline", + name: "notifications", + platform: { + os: "linux", + arch: "amd64", + }, + steps: [ + { + image: "plugins/matrix", + settings: { + homeserver: "https://matrix.rknet.org", + roomid: "MtidqQXWWAtQcByBhH:rknet.org", + template: "Status: **{{ build.status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
Message: {{ build.message }}", + username: { "from_secret": "matrix_username" }, + password: { "from_secret": "matrix_password" }, + }, + }, + ], + depends_on: [ + "testing", + ], + trigger: { + event: [ "push", "tag" ], + status: [ "success", "failure" ], + }, +}; + +[ + PipelineTesting, +] diff --git a/.drone.yml b/.drone.yml index 4c9c9c6..61cf231 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,58 +1,65 @@ --- kind: pipeline -name: default +name: testing + +platform: + os: linux + arch: amd64 workspace: base: /drone/src path: xoxys.nginx steps: - - name: ansible-latest - image: python:2.7 - pull: always - environment: - PY_COLORS: 1 - commands: - - pip install ansible ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] +- name: ansible-latest + pull: always + image: python:3.7 + commands: + - pip install ansible ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone + +- name: ansible-master + pull: always + image: python:3.7 + commands: + - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone - - name: ansible-master - image: python:2.7 - pull: always - environment: - PY_COLORS: 1 - commands: - - pip install git+https://github.com/ansible/ansible.git@devel -qq - - pip install ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] +- name: molecule + pull: always + image: xoxys/molecule:gce + commands: + - mkdir ./library/ + - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ + - "echo \"$GCE_SSH_KEY\" > $HOME/.ssh/google_compute_engine" + - chmod 600 $HOME/.ssh/google_compute_engine + - "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json" + - molecule create --scenario-name gce-centos-7 + - molecule converge --scenario-name gce-centos-7 + - molecule verify --scenario-name gce-centos-7 + - molecule destroy --scenario-name gce-centos-7 + environment: + GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + GCE_CREDENTIALS_JSON: + from_secret: gce_credentials_json + GCE_PROJECT_ID: + from_secret: gce_project_id + GCE_SERVICE_ACCOUNT_EMAIL: + from_secret: gce_service_account_email + GCE_SSH_KEY: + from_secret: gce_ssh_key + GCE_SSH_USER: + from_secret: gce_ssh_user + PY_COLORS: 1 - - name: molecule - image: xoxys/molecule:gce - pull: always - environment: - GCE_SSH_KEY: - from_secret: gce_ssh_key - GCE_SERVICE_ACCOUNT_EMAIL: - from_secret: gce_service_account_email - GCE_PROJECT_ID: - from_secret: gce_project_id - GCE_CREDENTIALS_JSON: - from_secret: gce_credentials_json - GCE_SSH_USER: - from_secret: gce_ssh_user - GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json - PY_COLORS: 1 - commands: - - mkdir ./library/ - - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - - chmod 600 $HOME/.ssh/google_compute_engine - - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - - molecule create --scenario-name gce-centos-7 - - molecule converge --scenario-name gce-centos-7 - - molecule verify --scenario-name gce-centos-7 - - molecule destroy --scenario-name gce-centos-7 +... diff --git a/.yamllint b/.yamllint deleted file mode 100644 index 3a2255e..0000000 --- a/.yamllint +++ /dev/null @@ -1,13 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - # NOTE(retr0h): Templates no longer fail this lint rule. - # Uncomment if running old Molecule templates. - # truthy: disable diff --git a/molecule/gce-centos-7/molecule.yml b/molecule/gce-centos-7/molecule.yml index d0a43fc..c7b5d82 100644 --- a/molecule/gce-centos-7/molecule.yml +++ b/molecule/gce-centos-7/molecule.yml @@ -22,9 +22,7 @@ verifier: lint: name: flake8 ansible: - raw_env_vars: - ANSIBLE_TIMEOUT: 60 ansiblecfg_defaults: force_color: true - nocolor: false roles_path: /drone/src + timeout: 60 diff --git a/pytest.ini b/molecule/pytest.ini similarity index 100% rename from pytest.ini rename to molecule/pytest.ini -- 2.24.4 From 55cfc3a2415a20a452263da5b9b6b259b5d76daa Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 1 Mar 2019 11:53:27 +0100 Subject: [PATCH 086/131] separate linting and deployment tests for better depenedency handling --- .drone.jsonnet | 27 +++++++++++++++++++++------ .drone.yml | 22 +++++++++++++++++----- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 35e280b..1459978 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -15,9 +15,22 @@ local AnsibleVersions(version="latest", package="ansible") = { ], }; -local PipelineTesting = { +local PipelineLinting = { kind: "pipeline", - name: "testing", + name: "linting", + platform: { + os: "linux", + arch: "amd64", + }, + steps: [ + AnsibleVersions(version="latest", package="ansible"), + AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), + ], +}; + +local PipelineDeployment = { + kind: "pipeline", + name: "deployment", platform: { os: "linux", arch: "amd64", @@ -27,8 +40,6 @@ local PipelineTesting = { path: "xoxys.nginx" }, steps: [ - AnsibleVersions(version="latest", package="ansible"), - AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), { name: "molecule", image: "xoxys/molecule:gce", @@ -55,6 +66,9 @@ local PipelineTesting = { ], }, ], + depends_on: [ + "linting", + ], }; local PipelineNotifications = { @@ -77,7 +91,7 @@ local PipelineNotifications = { }, ], depends_on: [ - "testing", + "deployment", ], trigger: { event: [ "push", "tag" ], @@ -86,5 +100,6 @@ local PipelineNotifications = { }; [ - PipelineTesting, + PipelineLinting, + PipelineDeployment ] diff --git a/.drone.yml b/.drone.yml index 61cf231..09a33f3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,15 +1,11 @@ --- kind: pipeline -name: testing +name: linting platform: os: linux arch: amd64 -workspace: - base: /drone/src - path: xoxys.nginx - steps: - name: ansible-latest pull: always @@ -35,6 +31,19 @@ steps: depends_on: - clone +--- +kind: pipeline +name: deployment + +platform: + os: linux + arch: amd64 + +workspace: + base: /drone/src + path: xoxys.nginx + +steps: - name: molecule pull: always image: xoxys/molecule:gce @@ -62,4 +71,7 @@ steps: from_secret: gce_ssh_user PY_COLORS: 1 +depends_on: +- linting + ... -- 2.24.4 From 3c6e49552353fb27a9a40189d7be879c40fd328d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 11:47:30 +0100 Subject: [PATCH 087/131] test with new image --- .drone.1.yml | 58 -------------------------------------------------- .drone.jsonnet | 6 +----- .drone.yml | 6 +----- 3 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 .drone.1.yml diff --git a/.drone.1.yml b/.drone.1.yml deleted file mode 100644 index 4c9c9c6..0000000 --- a/.drone.1.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -kind: pipeline -name: default - -workspace: - base: /drone/src - path: xoxys.nginx - -steps: - - name: ansible-latest - image: python:2.7 - pull: always - environment: - PY_COLORS: 1 - commands: - - pip install ansible ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] - - - name: ansible-master - image: python:2.7 - pull: always - environment: - PY_COLORS: 1 - commands: - - pip install git+https://github.com/ansible/ansible.git@devel -qq - - pip install ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini - depends_on: [ clone ] - - - name: molecule - image: xoxys/molecule:gce - pull: always - environment: - GCE_SSH_KEY: - from_secret: gce_ssh_key - GCE_SERVICE_ACCOUNT_EMAIL: - from_secret: gce_service_account_email - GCE_PROJECT_ID: - from_secret: gce_project_id - GCE_CREDENTIALS_JSON: - from_secret: gce_credentials_json - GCE_SSH_USER: - from_secret: gce_ssh_user - GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json - PY_COLORS: 1 - commands: - - mkdir ./library/ - - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - - echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine - - chmod 600 $HOME/.ssh/google_compute_engine - - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json - - molecule create --scenario-name gce-centos-7 - - molecule converge --scenario-name gce-centos-7 - - molecule verify --scenario-name gce-centos-7 - - molecule destroy --scenario-name gce-centos-7 diff --git a/.drone.jsonnet b/.drone.jsonnet index 1459978..fbdb822 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -51,14 +51,10 @@ local PipelineDeployment = { GCE_CREDENTIALS_JSON: { "from_secret": "gce_credentials_json" }, GCE_SSH_USER: { "from_secret": "gce_ssh_user" }, GCE_CREDENTIALS_FILE: "$HOME/ansible-testing.json", + MOLECULE_CUSTOM_MODULES_REPO: "https://gitea.rknet.org/ansible/custom_modules", PY_COLORS: 1 }, commands: [ - "mkdir ./library/", - "git clone https://gitea.rknet.org/ansible/custom_modules ./library/", - "echo \"$GCE_SSH_KEY\" > $HOME/.ssh/google_compute_engine", - "chmod 600 $HOME/.ssh/google_compute_engine", - "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json", "molecule create --scenario-name gce-centos-7", "molecule converge --scenario-name gce-centos-7", "molecule verify --scenario-name gce-centos-7", diff --git a/.drone.yml b/.drone.yml index 09a33f3..e4837a6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,11 +48,6 @@ steps: pull: always image: xoxys/molecule:gce commands: - - mkdir ./library/ - - git clone https://gitea.rknet.org/ansible/custom_modules ./library/ - - "echo \"$GCE_SSH_KEY\" > $HOME/.ssh/google_compute_engine" - - chmod 600 $HOME/.ssh/google_compute_engine - - "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 @@ -69,6 +64,7 @@ steps: from_secret: gce_ssh_key GCE_SSH_USER: from_secret: gce_ssh_user + MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 depends_on: -- 2.24.4 From 0e1fda9f687c48b57cdda8301aef88b48d760b19 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 12:06:00 +0100 Subject: [PATCH 088/131] run entrypoint script manual --- .drone.jsonnet | 1 + .drone.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.drone.jsonnet b/.drone.jsonnet index fbdb822..78ca1c5 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -55,6 +55,7 @@ local PipelineDeployment = { PY_COLORS: 1 }, commands: [ + "/root/docker-entrypoint.sh", "molecule create --scenario-name gce-centos-7", "molecule converge --scenario-name gce-centos-7", "molecule verify --scenario-name gce-centos-7", diff --git a/.drone.yml b/.drone.yml index e4837a6..c7f34db 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,6 +48,7 @@ steps: pull: always image: xoxys/molecule:gce commands: + - /root/docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 2f714e1d32d6d0b82ac83953a0051fc8e4bf8256 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 12:08:04 +0100 Subject: [PATCH 089/131] fix entrypoint path --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 78ca1c5..dddd197 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -55,7 +55,7 @@ local PipelineDeployment = { PY_COLORS: 1 }, commands: [ - "/root/docker-entrypoint.sh", + "/docker-entrypoint.sh", "molecule create --scenario-name gce-centos-7", "molecule converge --scenario-name gce-centos-7", "molecule verify --scenario-name gce-centos-7", -- 2.24.4 From dcada4ea03324e233b5fbf2fcc938f49ad7f5e97 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:30:35 +0100 Subject: [PATCH 090/131] fix entrypoint path --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index c7f34db..e1427f4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,7 +48,7 @@ steps: pull: always image: xoxys/molecule:gce commands: - - /root/docker-entrypoint.sh + - /docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From cfd0d39138fc3666beb45719ce90bb43b7401d58 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:34:32 +0100 Subject: [PATCH 091/131] use bash to run entrypoint --- .drone.jsonnet | 2 +- .drone.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index dddd197..8671670 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -55,7 +55,7 @@ local PipelineDeployment = { PY_COLORS: 1 }, commands: [ - "/docker-entrypoint.sh", + "/bin/bash /docker-entrypoint.sh", "molecule create --scenario-name gce-centos-7", "molecule converge --scenario-name gce-centos-7", "molecule verify --scenario-name gce-centos-7", diff --git a/.drone.yml b/.drone.yml index e1427f4..8bcbb73 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,7 +48,7 @@ steps: pull: always image: xoxys/molecule:gce commands: - - /docker-entrypoint.sh + - /bin/bash /docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 1d543e995576f1ff7a29b71686ab62f1f505cfea Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:38:59 +0100 Subject: [PATCH 092/131] testing --- .drone.yml | 59 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8bcbb73..9274d1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,35 +1,35 @@ ---- -kind: pipeline -name: linting +# --- +# kind: pipeline +# name: linting -platform: - os: linux - arch: amd64 +# platform: +# os: linux +# arch: amd64 -steps: -- name: ansible-latest - pull: always - image: python:3.7 - commands: - - pip install ansible ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" - environment: - PY_COLORS: 1 - depends_on: - - clone +# steps: +# - name: ansible-latest +# pull: always +# image: python:3.7 +# commands: +# - pip install ansible ansible-later -qq +# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy +# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" +# environment: +# PY_COLORS: 1 +# depends_on: +# - clone -- name: ansible-master - pull: always - image: python:3.7 - commands: - - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" - environment: - PY_COLORS: 1 - depends_on: - - clone +# - name: ansible-master +# pull: always +# image: python:3.7 +# commands: +# - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" +# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy +# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" +# environment: +# PY_COLORS: 1 +# depends_on: +# - clone --- kind: pipeline @@ -49,6 +49,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh + - echo "${MOLECULE_CUSTOM_MODULES_REPO}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 704c6aa250b832ca1ea26c8c146dd87dcf97c648 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:39:22 +0100 Subject: [PATCH 093/131] test --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9274d1c..330703a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -69,7 +69,7 @@ steps: MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 -depends_on: -- linting +# depends_on: +# - linting -... +# ... -- 2.24.4 From 62d7d9bcf45616b05622c4e94aefa06bc245a7ec Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:41:14 +0100 Subject: [PATCH 094/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 330703a..55600b8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "${MOLECULE_CUSTOM_MODULES_REPO}" + - echo "$MOLECULE_CUSTOM_MODULES_REPO" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 3294406e274b1c084e97083c2fe7c6c9f131350c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:42:57 +0100 Subject: [PATCH 095/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 55600b8..d3faf49 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$MOLECULE_CUSTOM_MODULES_REPO" + - "echo \"$MOLECULE_CUSTOM_MODULES_REPO\"" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 526cc38fc3b087c09a06c4dbebd5b29e7754123e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:45:13 +0100 Subject: [PATCH 096/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d3faf49..a6007a0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - "echo \"$MOLECULE_CUSTOM_MODULES_REPO\"" + - "echo ${MOLECULE_CUSTOM_MODULES_REPO}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 15663256640c5378eca1ffd8b6b7e46f4780920c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:46:12 +0100 Subject: [PATCH 097/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a6007a0..1463c08 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,7 +48,7 @@ steps: pull: always image: xoxys/molecule:gce commands: - - /bin/bash /docker-entrypoint.sh + #- /bin/bash /docker-entrypoint.sh - "echo ${MOLECULE_CUSTOM_MODULES_REPO}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 090980685cc7e1d9b4129b4c433932f58d5c0190 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:47:30 +0100 Subject: [PATCH 098/131] test --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1463c08..d5103f8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,8 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - "echo ${MOLECULE_CUSTOM_MODULES_REPO}" + - echo $PY_COLORS + - echo $HOME - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 05d63ae6b06f2ce07972f69e28288f8d20094a4a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:50:44 +0100 Subject: [PATCH 099/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d5103f8..faf3018 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,8 +49,8 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - echo $PY_COLORS - - echo $HOME + - echo ${PY_COLORS} + - echo ${HOME} - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 49aefbb0ae38bc15a9bf413dc2a941a97869099d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:54:41 +0100 Subject: [PATCH 100/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index faf3018..559af58 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,8 +49,8 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - echo ${PY_COLORS} - - echo ${HOME} + - echo "${PY_COLORS}" + - echo "${HOME}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From 0d31d7fd278515c63f92e16cd0073d7e1b54f86c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:55:59 +0100 Subject: [PATCH 101/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 559af58..5c00864 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - echo "${PY_COLORS}" + - echo "$PY_COLORS" - echo "${HOME}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 243bcb31f702cdbfa5df869ab325b6cfac148305 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:56:59 +0100 Subject: [PATCH 102/131] test --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5c00864..27a0029 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,8 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - echo "$PY_COLORS" + - echo "$PY_COLORS" > test.txt + - cat test.txt - echo "${HOME}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From a8a684baa6fa6f00c73e18b14fa2c10ee1b1a5be Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 13:58:18 +0100 Subject: [PATCH 103/131] test --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 27a0029..7fefb3c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,9 +49,8 @@ steps: image: xoxys/molecule:gce commands: #- /bin/bash /docker-entrypoint.sh - - echo "$PY_COLORS" > test.txt + - echo "${HOME}" > test.txt - cat test.txt - - echo "${HOME}" - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From ddb25410340269a60e15af96f3e71f38626d4dac Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 14:10:36 +0100 Subject: [PATCH 104/131] test --- .drone.yml | 68 ++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7fefb3c..8bcbb73 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,35 +1,35 @@ -# --- -# kind: pipeline -# name: linting +--- +kind: pipeline +name: linting -# platform: -# os: linux -# arch: amd64 +platform: + os: linux + arch: amd64 -# steps: -# - name: ansible-latest -# pull: always -# image: python:3.7 -# commands: -# - pip install ansible ansible-later -qq -# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy -# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" -# environment: -# PY_COLORS: 1 -# depends_on: -# - clone +steps: +- name: ansible-latest + pull: always + image: python:3.7 + commands: + - pip install ansible ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone -# - name: ansible-master -# pull: always -# image: python:3.7 -# commands: -# - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" -# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy -# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" -# environment: -# PY_COLORS: 1 -# depends_on: -# - clone +- name: ansible-master + pull: always + image: python:3.7 + commands: + - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone --- kind: pipeline @@ -48,9 +48,7 @@ steps: pull: always image: xoxys/molecule:gce commands: - #- /bin/bash /docker-entrypoint.sh - - echo "${HOME}" > test.txt - - cat test.txt + - /bin/bash /docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 @@ -70,7 +68,7 @@ steps: MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 -# depends_on: -# - linting +depends_on: +- linting -# ... +... -- 2.24.4 From 3190789a575d77b83760feb9079afd8868ce95b5 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 14:42:21 +0100 Subject: [PATCH 105/131] test --- .drone.yml | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8bcbb73..65383ad 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,36 +1,3 @@ ---- -kind: pipeline -name: linting - -platform: - os: linux - arch: amd64 - -steps: -- name: ansible-latest - pull: always - image: python:3.7 - commands: - - pip install ansible ansible-later -qq - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" - environment: - PY_COLORS: 1 - depends_on: - - clone - -- name: ansible-master - pull: always - image: python:3.7 - commands: - - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" - - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy - - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" - environment: - PY_COLORS: 1 - depends_on: - - clone - --- kind: pipeline name: deployment @@ -48,6 +15,7 @@ steps: pull: always image: xoxys/molecule:gce commands: + - '[ "$MOLECULE_CUSTOM_MODULES_REPO" ] && echo "Test"' - /bin/bash /docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 @@ -67,8 +35,3 @@ steps: from_secret: gce_ssh_user MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 - -depends_on: -- linting - -... -- 2.24.4 From 26e6944365f53e9e1f14f639251414719f77fcb2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 14:45:49 +0100 Subject: [PATCH 106/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 65383ad..481c498 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,14 +15,14 @@ steps: pull: always image: xoxys/molecule:gce commands: - - '[ "$MOLECULE_CUSTOM_MODULES_REPO" ] && echo "Test"' - /bin/bash /docker-entrypoint.sh + - ls -l - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 environment: - GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + GCE_CREDENTIALS_FILE: ./ansible-testing.json GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json GCE_PROJECT_ID: -- 2.24.4 From 2a42ab0a31f763d110cbd062dec53600ae003699 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 14:52:21 +0100 Subject: [PATCH 107/131] test --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 481c498..9bf8235 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,13 +16,14 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - ls -l + - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 environment: - GCE_CREDENTIALS_FILE: ./ansible-testing.json + GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json GCE_PROJECT_ID: -- 2.24.4 From 3876a2a78281dbd039c649beaba1399ed9013d8c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:07:18 +0100 Subject: [PATCH 108/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9bf8235..ea85b00 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json + - echo "$GCE_CREDENTIALS_JSON" > "$GCE_CREDENTIALS_FILE" - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 75bceb0669d1db1f1fbace6d4737427221cace41 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:08:16 +0100 Subject: [PATCH 109/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index ea85b00..6253239 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > "$GCE_CREDENTIALS_FILE" + - echo "$GCE_CREDENTIALS_JSON" > $GCE_CREDENTIALS_FILE - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 75aec2ba81a552c1829e23ad10600250cb35e0bc Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:10:32 +0100 Subject: [PATCH 110/131] test path --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6253239..04c5cb4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > $GCE_CREDENTIALS_FILE + - echo "$GCE_CREDENTIALS_JSON" > ${GCE_CREDENTIALS_FILE} - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 4a5854c34d37986ffcb6d238ce2d54554204c0c2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:11:30 +0100 Subject: [PATCH 111/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 04c5cb4..07edd5e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > ${GCE_CREDENTIALS_FILE} + - echo "$GCE_CREDENTIALS_JSON" > "${GCE_CREDENTIALS_FILE}" - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 201c9859564d5af89c602a132b5541977e62ed4f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:13:40 +0100 Subject: [PATCH 112/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 07edd5e..04c5cb4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > "${GCE_CREDENTIALS_FILE}" + - echo "$GCE_CREDENTIALS_JSON" > ${GCE_CREDENTIALS_FILE} - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 56a3087705bb772a8dc8a7b2bcc7a31346d49767 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:17:19 +0100 Subject: [PATCH 113/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 04c5cb4..0f4b723 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > ${GCE_CREDENTIALS_FILE} + - echo "$GCE_CREDENTIALS_JSON" > $$GCE_CREDENTIALS_FILE - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From 8d6c8406e54123a2453ada870ce02d1d614c99a7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:21:05 +0100 Subject: [PATCH 114/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0f4b723..ea85b00 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > $$GCE_CREDENTIALS_FILE + - echo "$GCE_CREDENTIALS_JSON" > "$GCE_CREDENTIALS_FILE" - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From edd607d2ee317de4543999bf059b05dbcffd210b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:22:33 +0100 Subject: [PATCH 115/131] test --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index ea85b00..a0f4e6e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - echo "$GCE_CREDENTIALS_JSON" > "$GCE_CREDENTIALS_FILE" + - "echo \"$GCE_CREDENTIALS_JSON\" > $GCE_CREDENTIALS_FILE" - ls -l /root/ - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 -- 2.24.4 From f03ca738eff1d3a73280f4d50d51d545c2eeb3d1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 15:23:34 +0100 Subject: [PATCH 116/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a0f4e6e..61f56e1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,8 +16,8 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - "echo \"$GCE_CREDENTIALS_JSON\" > $GCE_CREDENTIALS_FILE" - - ls -l /root/ + - "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json" + - ls -l - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 -- 2.24.4 From f0011727e3408f3c81fa50d1eeff3fb18e11a6fa Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 16:53:13 +0100 Subject: [PATCH 117/131] test --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 61f56e1..d3f7823 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,14 +16,14 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json" + - "echo \"$GCE_CREDENTIALS_JSON\" > $GCE_CREDENTIALS_FILE" - ls -l - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 environment: - GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + GCE_CREDENTIALS_FILE: \$HOME/ansible-testing.json GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json GCE_PROJECT_ID: -- 2.24.4 From c9f529c3d1dd836576f5273433c1a49019979482 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 12 Mar 2019 16:54:43 +0100 Subject: [PATCH 118/131] test --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d3f7823..5f7f125 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,6 +16,7 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh + - set -x - "echo \"$GCE_CREDENTIALS_JSON\" > $GCE_CREDENTIALS_FILE" - ls -l - molecule create --scenario-name gce-centos-7 @@ -23,7 +24,7 @@ steps: - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 environment: - GCE_CREDENTIALS_FILE: \$HOME/ansible-testing.json + GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json GCE_PROJECT_ID: -- 2.24.4 From a719a71e93362a90b810c8171416ad051ca4f9a0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 13 Mar 2019 07:59:46 +0100 Subject: [PATCH 119/131] fix env variables --- .drone.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5f7f125..a9f8211 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,15 +16,12 @@ steps: image: xoxys/molecule:gce commands: - /bin/bash /docker-entrypoint.sh - - set -x - - "echo \"$GCE_CREDENTIALS_JSON\" > $GCE_CREDENTIALS_FILE" - - ls -l - molecule create --scenario-name gce-centos-7 - molecule converge --scenario-name gce-centos-7 - molecule verify --scenario-name gce-centos-7 - molecule destroy --scenario-name gce-centos-7 environment: - GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json + GCE_CREDENTIALS_FILE: /root/ansible-testing.json GCE_CREDENTIALS_JSON: from_secret: gce_credentials_json GCE_PROJECT_ID: -- 2.24.4 From 78285c4d769ae97aed264516d24ac36bf9cf4760 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 13 Mar 2019 08:04:06 +0100 Subject: [PATCH 120/131] re-build drone config --- .drone.jsonnet | 2 +- .drone.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 8671670..915567b 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -50,7 +50,7 @@ local PipelineDeployment = { GCE_PROJECT_ID: { "from_secret": "gce_project_id" }, GCE_CREDENTIALS_JSON: { "from_secret": "gce_credentials_json" }, GCE_SSH_USER: { "from_secret": "gce_ssh_user" }, - GCE_CREDENTIALS_FILE: "$HOME/ansible-testing.json", + GCE_CREDENTIALS_FILE: "/root/ansible-testing.json", MOLECULE_CUSTOM_MODULES_REPO: "https://gitea.rknet.org/ansible/custom_modules", PY_COLORS: 1 }, diff --git a/.drone.yml b/.drone.yml index a9f8211..58ac7bf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,36 @@ +--- +kind: pipeline +name: linting + +platform: + os: linux + arch: amd64 + +steps: +- name: ansible-latest + pull: always + image: python:3.7 + commands: + - pip install ansible ansible-later -qq + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone + +- name: ansible-master + pull: always + image: python:3.7 + commands: + - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq" + - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy + - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini" + environment: + PY_COLORS: 1 + depends_on: + - clone + --- kind: pipeline name: deployment @@ -34,3 +67,8 @@ steps: from_secret: gce_ssh_user MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 + +depends_on: +- linting + +... -- 2.24.4 From c6ad4f5c441fbb999e0c31abd3a4cdee4fc566f4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 21 Mar 2019 13:12:52 +0100 Subject: [PATCH 121/131] fix molecule docker image --- .drone.jsonnet | 2 +- .drone.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 915567b..a4dae3a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -42,7 +42,7 @@ local PipelineDeployment = { steps: [ { name: "molecule", - image: "xoxys/molecule:gce", + image: "xoxys/molecule:gce-linux-amd64", pull: "always", environment: { GCE_SSH_KEY: { "from_secret": "gce_ssh_key" }, diff --git a/.drone.yml b/.drone.yml index 58ac7bf..a9a5416 100644 --- a/.drone.yml +++ b/.drone.yml @@ -46,7 +46,7 @@ workspace: steps: - name: molecule pull: always - image: xoxys/molecule:gce + image: xoxys/molecule:gce-linux-amd64 commands: - /bin/bash /docker-entrypoint.sh - molecule create --scenario-name gce-centos-7 -- 2.24.4 From 0438a339ef69d36a2173c61accfa6b2f48f89e26 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 11:38:47 +0100 Subject: [PATCH 122/131] force fail for testing --- tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index d385b8a..7add6e4 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,7 +1,7 @@ --- - block: - name: Add nginx repository - yum_repository: + yum_repository: name: nginx file: nginx description: NGINX High Performance Web Server @@ -11,7 +11,7 @@ when: nginx_official_repo_enabled - name: Installing nginx - package: + packages: name: nginx state: present -- 2.24.4 From a40b44851035d64380d6407815f9c4f4c5f0b447 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 11:42:25 +0100 Subject: [PATCH 123/131] revert test changes --- tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 7add6e4..d385b8a 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,7 +1,7 @@ --- - block: - name: Add nginx repository - yum_repository: + yum_repository: name: nginx file: nginx description: NGINX High Performance Web Server @@ -11,7 +11,7 @@ when: nginx_official_repo_enabled - name: Installing nginx - packages: + package: name: nginx state: present -- 2.24.4 From 47a910f609c5596f725b5cc68adbb6cb3748a344 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 13:42:56 +0100 Subject: [PATCH 124/131] add test to resolve http ports --- molecule/default/coverage.yml | 0 molecule/default/molecule.yml | 26 --------------------- molecule/default/playbook.yml | 5 ---- molecule/default/tests/test_default.py | 14 ----------- molecule/gce-centos-7/tests/test_default.py | 5 ++++ 5 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 molecule/default/coverage.yml delete mode 100644 molecule/default/molecule.yml delete mode 100644 molecule/default/playbook.yml delete mode 100644 molecule/default/tests/test_default.py diff --git a/molecule/default/coverage.yml b/molecule/default/coverage.yml deleted file mode 100644 index e69de29..0000000 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml deleted file mode 100644 index c7f2b27..0000000 --- a/molecule/default/molecule.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -dependency: - name: galaxy -driver: - name: delegated - options: - managed: False - ansible_connection_options: - ansible_connection: local -lint: - name: yamllint - enabled: False -platforms: - - name: instance -provisioner: - name: ansible - lint: - name: ansible-lint - playbooks: - converge: coverage.yml -scenario: - name: default -verifier: - name: testinfra - lint: - name: flake8 diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml deleted file mode 100644 index 22c7cb9..0000000 --- a/molecule/default/playbook.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Converge - hosts: localhost - roles: - - role: xoxys.nginx diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py deleted file mode 100644 index eedd64a..0000000 --- a/molecule/default/tests/test_default.py +++ /dev/null @@ -1,14 +0,0 @@ -import os - -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') - - -def test_hosts_file(host): - f = host.file('/etc/hosts') - - assert f.exists - assert f.user == 'root' - assert f.group == 'root' diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 45ddb66..2884f09 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -17,3 +17,8 @@ def test_nginx_running_and_enabled(host): nginx = host.service("nginx") assert nginx.is_running assert nginx.is_enabled + +def test_nginx_ports(host): + localhost = host.addr("127.0.0.1") + assert localhost.port(443).is_reachable + assert localhost.port(80).is_reachable -- 2.24.4 From 0b146f9943c8baf653c833fe6d7f6b308112b737 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 14:02:28 +0100 Subject: [PATCH 125/131] add some more basic tests --- molecule/gce-centos-7/tests/test_default.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 2884f09..81e55e1 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -18,7 +18,13 @@ def test_nginx_running_and_enabled(host): assert nginx.is_running assert nginx.is_enabled -def test_nginx_ports(host): - localhost = host.addr("127.0.0.1") - assert localhost.port(443).is_reachable - assert localhost.port(80).is_reachable +def test_nginx_process(host): + # Verify worker procs are running + master = host.process.get(user="root", comm="nginx") + workers = host.process.filter(ppid=master.pid) + assert len(workers) > 0 + +def test_nginx_socket(host): + # Verify the socket is listening for HTTP traffic + assert host.socket("tcp://0.0.0.0:80").is_listening + assert host.socket("tcp://0.0.0.0:443").is_listening -- 2.24.4 From 95ac8d29fab35b3fc50b20385c3a43f1891cf995 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 14:09:00 +0100 Subject: [PATCH 126/131] test socket against localhost --- molecule/gce-centos-7/tests/test_default.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 81e55e1..083c19f 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -26,5 +26,5 @@ def test_nginx_process(host): def test_nginx_socket(host): # Verify the socket is listening for HTTP traffic - assert host.socket("tcp://0.0.0.0:80").is_listening - assert host.socket("tcp://0.0.0.0:443").is_listening + assert host.socket("tcp://127.0.0.1:80").is_listening + assert host.socket("tcp://127.0.0.1:443").is_listening -- 2.24.4 From 40f4e6539adf0ad2e05d8d9a07ae2d8afb1516c4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 14:18:46 +0100 Subject: [PATCH 127/131] try to set some role variables --- molecule/gce-centos-7/playbook.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/molecule/gce-centos-7/playbook.yml b/molecule/gce-centos-7/playbook.yml index bebc4b5..71caa98 100644 --- a/molecule/gce-centos-7/playbook.yml +++ b/molecule/gce-centos-7/playbook.yml @@ -1,5 +1,8 @@ --- - name: Converge hosts: all + vars: + nginx_default_page_enabled: True + roles: - role: xoxys.nginx -- 2.24.4 From 17fe443fb420aea92ee67a04d91c8123370d9777 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 14:33:31 +0100 Subject: [PATCH 128/131] remove test for 443 --- molecule/gce-centos-7/tests/test_default.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 083c19f..5a020cd 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -26,5 +26,4 @@ def test_nginx_process(host): def test_nginx_socket(host): # Verify the socket is listening for HTTP traffic - assert host.socket("tcp://127.0.0.1:80").is_listening - assert host.socket("tcp://127.0.0.1:443").is_listening + assert host.socket("tcp://0.0.0.0:80").is_listening -- 2.24.4 From 7dd817f9109a874b6edec80c0e8f9a32b2d62f88 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 14:35:37 +0100 Subject: [PATCH 129/131] force ci run --- molecule/gce-centos-7/tests/test_default.py | 1 + 1 file changed, 1 insertion(+) diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index 5a020cd..fcf5946 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -27,3 +27,4 @@ def test_nginx_process(host): def test_nginx_socket(host): # Verify the socket is listening for HTTP traffic assert host.socket("tcp://0.0.0.0:80").is_listening + -- 2.24.4 From f49807ebf91e77a14b4f3aec2ac2a3179d84f2ff Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 22:17:21 +0100 Subject: [PATCH 130/131] small pipeline fixes --- .drone.jsonnet | 11 +++++++++-- .drone.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index a4dae3a..536a42f 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -26,6 +26,9 @@ local PipelineLinting = { AnsibleVersions(version="latest", package="ansible"), AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), ], + trigger: { + ref: ["refs/heads/master", "refs/tags/**", "refs/pull/**"], + }, }; local PipelineDeployment = { @@ -66,6 +69,9 @@ local PipelineDeployment = { depends_on: [ "linting", ], + trigger: { + ref: ["refs/heads/master", "refs/tags/**"], + }, }; local PipelineNotifications = { @@ -91,12 +97,13 @@ local PipelineNotifications = { "deployment", ], trigger: { - event: [ "push", "tag" ], status: [ "success", "failure" ], + ref: ["refs/heads/master", "refs/tags/**"], }, }; [ PipelineLinting, - PipelineDeployment + PipelineDeployment, + PipelineNotifications, ] diff --git a/.drone.yml b/.drone.yml index a9a5416..27bb1c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,6 +31,12 @@ steps: depends_on: - clone +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + --- kind: pipeline name: deployment @@ -68,7 +74,42 @@ steps: MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + depends_on: - linting +--- +kind: pipeline +name: notifications + +platform: + os: linux + arch: amd64 + +steps: +- image: plugins/matrix + settings: + homeserver: https://matrix.rknet.org + password: + from_secret: matrix_password + roomid: MtidqQXWWAtQcByBhH:rknet.org + template: "Status: **{{ build.status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
Message: {{ build.message }}" + username: + from_secret: matrix_username + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + status: + - success + - failure + +depends_on: +- deployment + ... -- 2.24.4 From 93a2a0ff1a51d5d8c92d0cd57e105ff3f5bc2775 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 22:19:03 +0100 Subject: [PATCH 131/131] fix missing drone task name --- .drone.jsonnet | 1 + .drone.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 536a42f..87e0641 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -83,6 +83,7 @@ local PipelineNotifications = { }, steps: [ { + name: "matrix", image: "plugins/matrix", settings: { homeserver: "https://matrix.rknet.org", diff --git a/.drone.yml b/.drone.yml index 27bb1c6..097555f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -91,7 +91,8 @@ platform: arch: amd64 steps: -- image: plugins/matrix +- name: matrix + image: plugins/matrix settings: homeserver: https://matrix.rknet.org password: -- 2.24.4