This repository was archived by the owner on Oct 15, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ This will deploy the build of https://git.example.org/website.git by
23
23
using rsync as rsync_user on www.example.org , copying in /var/www/html.
24
24
25
25
The script will not sync if build failed, and will not send email (that's on the
26
- TODO list, see end of the file)
26
+ TODO list, see end of the file). Nevertheless, failures caught by Cron can be
27
+ sent to an email address if specified by ` cron_error_email ` ; if you setup
28
+ multiple builders using the same UNIX user, then beware only the latest email
29
+ defined will be taken into account.
27
30
28
31
# Handling multiple repositories
29
32
Original file line number Diff line number Diff line change 81
81
job : " /usr/local/bin/build_deploy.py /srv/builder/{{ name }}.yml"
82
82
user : " {{ builder_username }}"
83
83
84
+ - name : Setup cron email
85
+ cronvar :
86
+ user : " {{ builder_username }}"
87
+ name : MAILTO
88
+ value : " {{ cron_error_email }}"
89
+ when : cron_error_email is defined
90
+
84
91
# TODO add ip restriction
85
92
- name : Copy the key on the other side
86
93
authorized_key :
95
102
set_fact :
96
103
remote_user : " {{ rsync_user }}"
97
104
remote_host : " {{ rsync_server }}"
98
- when : rsync_url
105
+ when : rsync_url != ''
99
106
100
107
- name : Compute SSH config for openshift sync
101
108
block :
111
118
# seen pattern: <user>@<host> or ssh://<user>@<host>/<path>
112
119
remote_user : " {{ site.openshift | regex_replace('^.*?([^/]+)@.*$', '\\ 1') }}"
113
120
remote_host : " {{ site.openshift | regex_replace('^.*@([^/]+).*$', '\\ 1') }}"
114
- when : not rsync_url
121
+ when : rsync_url == ''
115
122
116
123
- name : Create SSH config
117
124
blockinfile :
You can’t perform that action at this time.
0 commit comments