antelope-cli 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ansible/onboarding-ca/README.md +105 -105
- package/ansible/onboarding-ca/onboard-ca.yml +43 -51
- package/ansible/onboarding-ca/requirements.yml +8 -8
- package/ansible/onboarding-ca/roles/onboard_ca/defaults/main.yml +77 -49
- package/ansible/onboarding-ca/roles/onboard_ca/meta/main.yml +10 -10
- package/ansible/onboarding-ca/roles/onboard_ca/tasks/main.yml +311 -193
- package/ansible/onboarding-ca/roles/onboard_ca/tasks/per_branch.yml +114 -107
- package/ansible/onboarding-ca/roles/onboard_ca/vars/main.yml +9 -9
- package/ansible/onboarding-crm/README.md +107 -0
- package/ansible/onboarding-crm/onboard-crm.yml +57 -0
- package/ansible/onboarding-crm/requirements.yml +8 -0
- package/ansible/onboarding-crm/roles/onboard_crm/defaults/main.yml +98 -0
- package/ansible/onboarding-crm/roles/onboard_crm/meta/main.yml +10 -0
- package/ansible/onboarding-crm/roles/onboard_crm/tasks/main.yml +357 -0
- package/ansible/onboarding-crm/roles/onboard_crm/tasks/per_branch.yml +138 -0
- package/ansible/onboarding-crm/roles/onboard_crm/vars/main.yml +9 -0
- package/index.js +12 -12
- package/onboarding/brand.js +21 -21
- package/onboarding/createConfig.js +71 -71
- package/onboarding/favicon.js +24 -24
- package/onboarding/index.js +62 -62
- package/onboarding/logo.js +16 -16
- package/onboarding/themes.js +92 -92
- package/onboarding/translations.js +41 -41
- package/onboarding/variablesColors.js +58 -58
- package/onboarding-ca/brand.js +13 -13
- package/onboarding-ca/index.js +94 -94
- package/onboarding-ca/riskDisclaimer.js +27 -27
- package/onboarding-ca/scss.js +24 -24
- package/onboarding-ca/templates/risk-disclaimer.html +12 -12
- package/onboarding-crm/brand.js +22 -22
- package/onboarding-crm/brandLogos.js +31 -0
- package/onboarding-crm/createConfig.js +47 -40
- package/onboarding-crm/index.js +181 -171
- package/onboarding-crm/themes.js +92 -92
- package/onboarding-crm/variablesColors.js +53 -53
- package/package.json +30 -30
|
@@ -1,193 +1,311 @@
|
|
|
1
|
-
---
|
|
2
|
-
# --- Resolve secrets: prefer the provided value, else fall back to 1Password (op CLI) ---
|
|
3
|
-
# The op fallback needs a signed-in `op` on the control node (op signin, or
|
|
4
|
-
# OP_SERVICE_ACCOUNT_TOKEN). A missing/failed op is tolerated here; the validate step
|
|
5
|
-
# below reports the still-empty token with a clear message.
|
|
6
|
-
- name: Fetch the Bitbucket API token from 1Password
|
|
7
|
-
when: (bitbucket_token | default('') | length) == 0
|
|
8
|
-
ansible.builtin.command:
|
|
9
|
-
argv:
|
|
10
|
-
- op
|
|
11
|
-
- item
|
|
12
|
-
- get
|
|
13
|
-
- "{{ onepassword_bitbucket_item }}"
|
|
14
|
-
- "--
|
|
15
|
-
- "
|
|
16
|
-
- "--
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- (
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
- "
|
|
51
|
-
- "--
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
#
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ansible.builtin.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- name:
|
|
192
|
-
|
|
193
|
-
|
|
1
|
+
---
|
|
2
|
+
# --- Resolve secrets: prefer the provided value, else fall back to 1Password (op CLI) ---
|
|
3
|
+
# The op fallback needs a signed-in `op` on the control node (op signin, or
|
|
4
|
+
# OP_SERVICE_ACCOUNT_TOKEN). A missing/failed op is tolerated here; the validate step
|
|
5
|
+
# below reports the still-empty token with a clear message.
|
|
6
|
+
- name: Fetch the Bitbucket API token from 1Password
|
|
7
|
+
when: (bitbucket_token | default('') | length) == 0
|
|
8
|
+
ansible.builtin.command:
|
|
9
|
+
argv:
|
|
10
|
+
- op
|
|
11
|
+
- item
|
|
12
|
+
- get
|
|
13
|
+
- "{{ onepassword_bitbucket_item }}"
|
|
14
|
+
- "--vault"
|
|
15
|
+
- "{{ onepassword_vault }}"
|
|
16
|
+
- "--fields"
|
|
17
|
+
- "label={{ onepassword_bitbucket_field }}"
|
|
18
|
+
- "--reveal"
|
|
19
|
+
register: op_bitbucket
|
|
20
|
+
changed_when: false
|
|
21
|
+
failed_when: false
|
|
22
|
+
no_log: true
|
|
23
|
+
|
|
24
|
+
- name: Adopt the 1Password Bitbucket token
|
|
25
|
+
when:
|
|
26
|
+
- (bitbucket_token | default('') | length) == 0
|
|
27
|
+
- op_bitbucket is not skipped
|
|
28
|
+
- (op_bitbucket.rc | default(1)) == 0
|
|
29
|
+
- (op_bitbucket.stdout | default('') | length) > 0
|
|
30
|
+
ansible.builtin.set_fact:
|
|
31
|
+
bitbucket_token: "{{ op_bitbucket.stdout | trim }}"
|
|
32
|
+
no_log: true
|
|
33
|
+
|
|
34
|
+
# Consul token is only needed when destination branches are derived (no dest_branches override).
|
|
35
|
+
- name: Resolve the Consul token from the environment
|
|
36
|
+
when: (consul_token | default('') | length) == 0
|
|
37
|
+
ansible.builtin.set_fact:
|
|
38
|
+
consul_token: "{{ lookup('env', 'CONSUL_HTTP_TOKEN') }}"
|
|
39
|
+
no_log: true
|
|
40
|
+
|
|
41
|
+
- name: Fetch the Consul token from 1Password
|
|
42
|
+
when:
|
|
43
|
+
- (consul_token | default('') | length) == 0
|
|
44
|
+
- (dest_branches | default('') | length) == 0
|
|
45
|
+
ansible.builtin.command:
|
|
46
|
+
argv:
|
|
47
|
+
- op
|
|
48
|
+
- item
|
|
49
|
+
- get
|
|
50
|
+
- "{{ onepassword_consul_item }}"
|
|
51
|
+
- "--vault"
|
|
52
|
+
- "{{ onepassword_vault }}"
|
|
53
|
+
- "--fields"
|
|
54
|
+
- "label={{ onepassword_consul_field }}"
|
|
55
|
+
- "--reveal"
|
|
56
|
+
register: op_consul
|
|
57
|
+
changed_when: false
|
|
58
|
+
failed_when: false
|
|
59
|
+
no_log: true
|
|
60
|
+
|
|
61
|
+
- name: Adopt the 1Password Consul token
|
|
62
|
+
when:
|
|
63
|
+
- (consul_token | default('') | length) == 0
|
|
64
|
+
- op_consul is not skipped
|
|
65
|
+
- (op_consul.rc | default(1)) == 0
|
|
66
|
+
- (op_consul.stdout | default('') | length) > 0
|
|
67
|
+
ansible.builtin.set_fact:
|
|
68
|
+
consul_token: "{{ op_consul.stdout | trim }}"
|
|
69
|
+
no_log: true
|
|
70
|
+
|
|
71
|
+
- name: Validate required inputs
|
|
72
|
+
ansible.builtin.assert:
|
|
73
|
+
that:
|
|
74
|
+
- brand_name is defined and (brand_name | length) > 0
|
|
75
|
+
- jira_key_client_branding is defined and (jira_key_client_branding | length) > 0
|
|
76
|
+
- bitbucket_token is defined and (bitbucket_token | length) > 0
|
|
77
|
+
- bitbucket_email is defined and (bitbucket_email | length) > 0
|
|
78
|
+
fail_msg: >-
|
|
79
|
+
brand_name, jira_key_client_branding and bitbucket_email are required, and bitbucket_token must be
|
|
80
|
+
provided (via --extra-vars / prompt) or resolvable from 1Password item
|
|
81
|
+
'{{ onepassword_bitbucket_item }}' field '{{ onepassword_bitbucket_field }}' (op signin).
|
|
82
|
+
|
|
83
|
+
- name: Compute effective brand assets folder
|
|
84
|
+
ansible.builtin.set_fact:
|
|
85
|
+
brand_assets_folder: >-
|
|
86
|
+
{{ brand_assets_folder
|
|
87
|
+
if (brand_assets_folder | default('') | length) > 0
|
|
88
|
+
else (brand_name | lower | regex_replace(' ', '')) }}
|
|
89
|
+
|
|
90
|
+
# --- Destination branches: derived from the release train in Consul ------------------
|
|
91
|
+
# develop is always onboarded. master-<version/prod> tracks the live release; while a new
|
|
92
|
+
# release is staged (version/staging != version/prod) its master-<version/staging> exists
|
|
93
|
+
# too and is onboarded as well. Once staging == prod (the release has shipped) there is a
|
|
94
|
+
# single master branch. An explicit dest_branches extra-var bypasses the lookup entirely.
|
|
95
|
+
- name: Resolve destination branches from Consul
|
|
96
|
+
when: (dest_branches | default('') | length) == 0
|
|
97
|
+
block:
|
|
98
|
+
- name: Consul token is required to derive destination branches
|
|
99
|
+
ansible.builtin.assert:
|
|
100
|
+
that:
|
|
101
|
+
- consul_token is defined and (consul_token | length) > 0
|
|
102
|
+
fail_msg: >-
|
|
103
|
+
consul_token is required to read version/prod and version/staging. Provide it via
|
|
104
|
+
-e consul_token=..., $CONSUL_HTTP_TOKEN, or 1Password item '{{ onepassword_consul_item }}'
|
|
105
|
+
(op signin); or pass -e dest_branches=develop,master-XX.Y to bypass the Consul lookup.
|
|
106
|
+
|
|
107
|
+
- name: Read the prod release version from Consul
|
|
108
|
+
ansible.builtin.uri:
|
|
109
|
+
url: "{{ consul_url }}/v1/kv/version/prod?raw=1"
|
|
110
|
+
headers:
|
|
111
|
+
X-Consul-Token: "{{ consul_token }}"
|
|
112
|
+
return_content: true
|
|
113
|
+
register: consul_prod
|
|
114
|
+
|
|
115
|
+
- name: Read the staging release version from Consul
|
|
116
|
+
ansible.builtin.uri:
|
|
117
|
+
url: "{{ consul_url }}/v1/kv/version/staging?raw=1"
|
|
118
|
+
headers:
|
|
119
|
+
X-Consul-Token: "{{ consul_token }}"
|
|
120
|
+
return_content: true
|
|
121
|
+
register: consul_staging
|
|
122
|
+
|
|
123
|
+
- name: Derive the destination branch list from the release versions
|
|
124
|
+
ansible.builtin.set_fact:
|
|
125
|
+
dest_branch_list: >-
|
|
126
|
+
{{ ['develop', 'master-' + (consul_prod.content | trim)]
|
|
127
|
+
+ (['master-' + (consul_staging.content | trim)]
|
|
128
|
+
if (consul_staging.content | trim) != (consul_prod.content | trim) else []) }}
|
|
129
|
+
|
|
130
|
+
- name: Normalize destination branch list (explicit override)
|
|
131
|
+
when: (dest_branches | default('') | length) > 0
|
|
132
|
+
ansible.builtin.set_fact:
|
|
133
|
+
dest_branch_list: "{{ dest_branches.split(',') | map('trim') | reject('equalto', '') | list }}"
|
|
134
|
+
|
|
135
|
+
- name: Show the resolved destination branches
|
|
136
|
+
ansible.builtin.debug:
|
|
137
|
+
msg: "Destination branches: {{ dest_branch_list }}"
|
|
138
|
+
|
|
139
|
+
# --- Jira Fix Version: DangerJS fails any web-client-area PR whose linked issue has no
|
|
140
|
+
# Fix Version, so stamp the release version (V<version/prod>) on the ticket BEFORE the
|
|
141
|
+
# branches are pushed. Non-fatal — a missing token / unmatched version warns and skips.
|
|
142
|
+
- name: Set the Jira Fix Version on the branding ticket
|
|
143
|
+
when: manage_jira_fix_version | bool
|
|
144
|
+
block:
|
|
145
|
+
- name: Fetch the Jira token from 1Password
|
|
146
|
+
when: (jira_token | default('') | length) == 0
|
|
147
|
+
ansible.builtin.command:
|
|
148
|
+
argv:
|
|
149
|
+
- op
|
|
150
|
+
- item
|
|
151
|
+
- get
|
|
152
|
+
- "{{ onepassword_jira_item }}"
|
|
153
|
+
- "--vault"
|
|
154
|
+
- "{{ onepassword_vault }}"
|
|
155
|
+
- "--fields"
|
|
156
|
+
- "label={{ onepassword_jira_field }}"
|
|
157
|
+
- "--reveal"
|
|
158
|
+
register: op_jira
|
|
159
|
+
changed_when: false
|
|
160
|
+
failed_when: false
|
|
161
|
+
no_log: true
|
|
162
|
+
|
|
163
|
+
- name: Adopt the 1Password Jira token
|
|
164
|
+
when:
|
|
165
|
+
- (jira_token | default('') | length) == 0
|
|
166
|
+
- op_jira is not skipped
|
|
167
|
+
- (op_jira.rc | default(1)) == 0
|
|
168
|
+
- (op_jira.stdout | default('') | length) > 0
|
|
169
|
+
ansible.builtin.set_fact:
|
|
170
|
+
jira_token: "{{ op_jira.stdout | trim }}"
|
|
171
|
+
no_log: true
|
|
172
|
+
|
|
173
|
+
# master-<ver> / release-<ver> destination branches → Fix Version names (e.g. V27.0).
|
|
174
|
+
- name: Derive the release Fix Version name(s)
|
|
175
|
+
ansible.builtin.set_fact:
|
|
176
|
+
jira_fix_versions: >-
|
|
177
|
+
{{ dest_branch_list
|
|
178
|
+
| select('match', '^(master|release)-')
|
|
179
|
+
| map('regex_replace', '^(master|release)-', jira_version_prefix)
|
|
180
|
+
| list | unique }}
|
|
181
|
+
|
|
182
|
+
- name: Warn when the Fix Version cannot be set
|
|
183
|
+
when: (jira_token | default('') | length) == 0 or (jira_fix_versions | length) == 0
|
|
184
|
+
ansible.builtin.debug:
|
|
185
|
+
msg: >-
|
|
186
|
+
Skipping Jira Fix Version ({{ 'no jira_token — provide -e jira_token= or 1Password item '
|
|
187
|
+
~ onepassword_jira_item if (jira_token | default('') | length) == 0
|
|
188
|
+
else 'no master-<ver> destination branch to derive the version from' }}).
|
|
189
|
+
DangerJS will fail until a Fix Version is set on {{ jira_key_client_branding }}.
|
|
190
|
+
|
|
191
|
+
- name: Look up the Jira project versions
|
|
192
|
+
when:
|
|
193
|
+
- (jira_token | default('') | length) > 0
|
|
194
|
+
- (jira_fix_versions | length) > 0
|
|
195
|
+
ansible.builtin.uri:
|
|
196
|
+
url: "{{ jira_base_url }}/rest/api/2/project/{{ jira_project_key }}/versions"
|
|
197
|
+
url_username: "{{ jira_email }}"
|
|
198
|
+
url_password: "{{ jira_token }}"
|
|
199
|
+
force_basic_auth: true
|
|
200
|
+
return_content: true
|
|
201
|
+
register: jira_versions
|
|
202
|
+
failed_when: false
|
|
203
|
+
no_log: true
|
|
204
|
+
|
|
205
|
+
- name: Map Fix Version name(s) to id(s)
|
|
206
|
+
when:
|
|
207
|
+
- jira_versions is defined
|
|
208
|
+
- (jira_versions.status | default(0)) == 200
|
|
209
|
+
ansible.builtin.set_fact:
|
|
210
|
+
jira_fix_version_ids: >-
|
|
211
|
+
{{ jira_versions.json
|
|
212
|
+
| selectattr('name', 'in', jira_fix_versions)
|
|
213
|
+
| map(attribute='id')
|
|
214
|
+
| map('community.general.dict_kv', 'id')
|
|
215
|
+
| list }}
|
|
216
|
+
|
|
217
|
+
- name: Report Fix Version names not found in the project
|
|
218
|
+
when:
|
|
219
|
+
- jira_versions is defined
|
|
220
|
+
- (jira_versions.status | default(0)) == 200
|
|
221
|
+
- (jira_fix_version_ids | default([]) | length) < (jira_fix_versions | length)
|
|
222
|
+
ansible.builtin.debug:
|
|
223
|
+
msg: >-
|
|
224
|
+
Some Fix Version name(s) in {{ jira_fix_versions }} do not exist in project
|
|
225
|
+
{{ jira_project_key }} — create them in Jira first. Setting only the matched ones.
|
|
226
|
+
|
|
227
|
+
# Additive (keeps any existing fixVersions); Jira dedups by id, so re-runs are idempotent.
|
|
228
|
+
- name: Set the Fix Version on {{ jira_key_client_branding }}
|
|
229
|
+
when: (jira_fix_version_ids | default([]) | length) > 0
|
|
230
|
+
ansible.builtin.uri:
|
|
231
|
+
url: "{{ jira_base_url }}/rest/api/2/issue/{{ jira_key_client_branding }}"
|
|
232
|
+
method: PUT
|
|
233
|
+
url_username: "{{ jira_email }}"
|
|
234
|
+
url_password: "{{ jira_token }}"
|
|
235
|
+
force_basic_auth: true
|
|
236
|
+
body_format: json
|
|
237
|
+
body:
|
|
238
|
+
update:
|
|
239
|
+
fixVersions: "{{ jira_fix_version_ids | map('community.general.dict_kv', 'add') | list }}"
|
|
240
|
+
status_code: [204]
|
|
241
|
+
register: jira_fixver_set
|
|
242
|
+
failed_when: false
|
|
243
|
+
no_log: true
|
|
244
|
+
|
|
245
|
+
- name: Confirm the Fix Version result
|
|
246
|
+
ansible.builtin.debug:
|
|
247
|
+
msg: >-
|
|
248
|
+
{{ 'Set Fix Version ' ~ jira_fix_versions | join(', ') ~ ' on ' ~ jira_key_client_branding
|
|
249
|
+
if (jira_fixver_set.status | default(0)) == 204
|
|
250
|
+
else 'Fix Version not set (HTTP ' ~ (jira_fixver_set.status | default('n/a')) ~ ')' }}
|
|
251
|
+
when: jira_fixver_set is defined and (jira_fixver_set is not skipped)
|
|
252
|
+
|
|
253
|
+
# --- Reviewers: pull from the repo's Bitbucket default-reviewers config -------------
|
|
254
|
+
- name: Resolve reviewers from repo default-reviewers config
|
|
255
|
+
when: (reviewers | length) == 0
|
|
256
|
+
block:
|
|
257
|
+
- name: Identify the authenticating Bitbucket account (PR author)
|
|
258
|
+
ansible.builtin.uri:
|
|
259
|
+
url: "{{ api_base }}/user"
|
|
260
|
+
url_username: "{{ bitbucket_email }}"
|
|
261
|
+
url_password: "{{ bitbucket_token }}"
|
|
262
|
+
force_basic_auth: true
|
|
263
|
+
return_content: true
|
|
264
|
+
register: bb_user
|
|
265
|
+
|
|
266
|
+
- name: Fetch the repository default reviewers
|
|
267
|
+
ansible.builtin.uri:
|
|
268
|
+
url: "{{ api_base }}/repositories/{{ workspace }}/{{ repo_slug }}/default-reviewers?pagelen=100"
|
|
269
|
+
url_username: "{{ bitbucket_email }}"
|
|
270
|
+
url_password: "{{ bitbucket_token }}"
|
|
271
|
+
force_basic_auth: true
|
|
272
|
+
return_content: true
|
|
273
|
+
register: bb_default_reviewers
|
|
274
|
+
|
|
275
|
+
# Bitbucket rejects a PR whose author is also a reviewer, so drop the authenticating account.
|
|
276
|
+
# The REST API does not auto-apply default reviewers, so we pass them explicitly.
|
|
277
|
+
# Bitbucket's PR-create reviewers array is keyed by uuid; exclude the author by account_id.
|
|
278
|
+
# Built in a single expression (not an accumulating set_fact loop, which is nondeterministic).
|
|
279
|
+
- name: Build reviewers list (excluding the PR author)
|
|
280
|
+
ansible.builtin.set_fact:
|
|
281
|
+
reviewers: >-
|
|
282
|
+
{{ bb_default_reviewers.json['values']
|
|
283
|
+
| rejectattr('account_id', 'equalto', bb_user.json.account_id)
|
|
284
|
+
| map(attribute='uuid')
|
|
285
|
+
| map('community.general.dict_kv', 'uuid')
|
|
286
|
+
| list }}
|
|
287
|
+
|
|
288
|
+
- name: Ensure clone parent directory exists
|
|
289
|
+
ansible.builtin.file:
|
|
290
|
+
path: "{{ work_dir | dirname }}"
|
|
291
|
+
state: directory
|
|
292
|
+
mode: "0755"
|
|
293
|
+
|
|
294
|
+
- name: Clone / refresh web-client-area over SSH
|
|
295
|
+
ansible.builtin.git:
|
|
296
|
+
repo: "{{ repo_ssh_url }}"
|
|
297
|
+
dest: "{{ work_dir }}"
|
|
298
|
+
version: "{{ dest_branch_list[0] }}"
|
|
299
|
+
update: true
|
|
300
|
+
force: true
|
|
301
|
+
accept_hostkey: true
|
|
302
|
+
|
|
303
|
+
- name: Onboard the brand on each destination branch
|
|
304
|
+
ansible.builtin.include_tasks: per_branch.yml
|
|
305
|
+
loop: "{{ dest_branch_list }}"
|
|
306
|
+
loop_control:
|
|
307
|
+
loop_var: dest_branch
|
|
308
|
+
|
|
309
|
+
- name: Summary of pull requests
|
|
310
|
+
ansible.builtin.debug:
|
|
311
|
+
msg: "{{ pr_results | default([]) }}"
|