From 7fab29d9dfb85050cf6a43903f1c9f4e2b13f56e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 3 Feb 2019 23:15:48 +0100 Subject: [PATCH] add notify task to drone config; use state present for package install --- .drone.yml | 24 ++++++++++++++++++++++-- tasks/yum_cron.yml | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 289d224..53d816a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,8 @@ steps: - 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 ] + depends_on: + - clone - name: ansible-master image: python:2.7 @@ -19,4 +20,23 @@ steps: - 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 ] + depends_on: + - clone + + - name: notify + 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: + - ansible-latest + - ansible-master + when: + status: + - success + - failure diff --git a/tasks/yum_cron.yml b/tasks/yum_cron.yml index dce64be..31cc8af 100644 --- a/tasks/yum_cron.yml +++ b/tasks/yum_cron.yml @@ -3,7 +3,7 @@ - name: Install yum-cron package: name: yum-cron - state: latest + state: present - name: Ensure yum-cron is enabled and running service: