commit | author | age
|
2282af
|
1 |
--- |
GH |
2 |
- name: Check if gitea user already exists (note; error can be ignored) |
|
3 |
uri: |
ddd690
|
4 |
url: "https://{{ gitea_route.stdout }}/api/v1/users/{{ _namespace }}" |
2282af
|
5 |
method: GET |
GH |
6 |
validate_certs: false |
|
7 |
register: gitea_user |
|
8 |
ignore_errors: true |
|
9 |
|
|
10 |
- name: Create user in gitea |
ddd690
|
11 |
uri: |
GH |
12 |
url: "https://{{ gitea_route.stdout }}/api/v1/admin/users" |
|
13 |
method: POST |
|
14 |
body: "{{ body }}" |
|
15 |
status_code: 201 |
|
16 |
body_format: json |
|
17 |
validate_certs: false |
|
18 |
user: "{{ _gitea_admin_name }}" |
|
19 |
password: "{{ _account_password }}" |
|
20 |
force_basic_auth: true |
2282af
|
21 |
when: gitea_user.status == 404 |
ddd690
|
22 |
vars: |
GH |
23 |
body: |
|
24 |
email: "{{ _namespace }}@workshop.com" |
|
25 |
full_name: "{{ _namespace }}" |
|
26 |
login_name: "{{ _namespace }}" |
|
27 |
must_change_password: false |
|
28 |
password: "{{ _account_password }}" |
|
29 |
send_notify: false |
|
30 |
source_id: 0 |
|
31 |
username: "{{ _namespace }}" |
2282af
|
32 |
|
05c8bb
|
33 |
- name: Check if gitea proactive-fraud-detection-bucketrepo repo already exists (note; error can be ignored) |
2282af
|
34 |
uri: |
05c8bb
|
35 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-bucketrepo" |
2282af
|
36 |
method: GET |
GH |
37 |
validate_certs: false |
ddd690
|
38 |
user: "{{ _namespace }}" |
2282af
|
39 |
password: "{{ _account_password }}" |
GH |
40 |
force_basic_auth: true |
05c8bb
|
41 |
register: gitea_repo_bucketrepo |
GH |
42 |
ignore_errors: true |
|
43 |
|
|
44 |
- name: Check if gitea proactive-fraud-detection-doc repo already exists (note; error can be ignored) |
|
45 |
uri: |
|
46 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-doc" |
|
47 |
method: GET |
|
48 |
validate_certs: false |
|
49 |
user: "{{ _namespace }}" |
|
50 |
password: "{{ _account_password }}" |
|
51 |
force_basic_auth: true |
|
52 |
register: gitea_repo_doc |
|
53 |
ignore_errors: true |
|
54 |
|
|
55 |
- name: Check if gitea proactive-fraud-detection-fuse repo already exists (note; error can be ignored) |
|
56 |
uri: |
|
57 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-fuse" |
|
58 |
method: GET |
|
59 |
validate_certs: false |
|
60 |
user: "{{ _namespace }}" |
|
61 |
password: "{{ _account_password }}" |
|
62 |
force_basic_auth: true |
|
63 |
register: gitea_repo_fuse |
|
64 |
ignore_errors: true |
|
65 |
|
|
66 |
- name: Check if gitea proactive-fraud-detection-kafka repo already exists (note; error can be ignored) |
|
67 |
uri: |
|
68 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-kafka" |
|
69 |
method: GET |
|
70 |
validate_certs: false |
|
71 |
user: "{{ _namespace }}" |
|
72 |
password: "{{ _account_password }}" |
|
73 |
force_basic_auth: true |
|
74 |
register: gitea_repo_kafka |
|
75 |
ignore_errors: true |
|
76 |
|
|
77 |
- name: Check if gitea proactive-fraud-detection-dmn repo already exists (note; error can be ignored) |
|
78 |
uri: |
|
79 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-dmn" |
|
80 |
method: GET |
|
81 |
validate_certs: false |
|
82 |
user: "{{ _namespace }}" |
|
83 |
password: "{{ _account_password }}" |
|
84 |
force_basic_auth: true |
|
85 |
register: gitea_repo_dmn |
|
86 |
ignore_errors: true |
|
87 |
|
|
88 |
- name: Check if gitea proactive-fraud-detection-case repo already exists (note; error can be ignored) |
|
89 |
uri: |
|
90 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-case" |
|
91 |
method: GET |
|
92 |
validate_certs: false |
|
93 |
user: "{{ _namespace }}" |
|
94 |
password: "{{ _account_password }}" |
|
95 |
force_basic_auth: true |
|
96 |
register: gitea_repo_case |
|
97 |
ignore_errors: true |
|
98 |
|
|
99 |
- name: Check if gitea proactive-fraud-detection-kclient repo already exists (note; error can be ignored) |
|
100 |
uri: |
|
101 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/{{ _namespace }}/proactive-fraud-detection-kclient" |
|
102 |
method: GET |
|
103 |
validate_certs: false |
|
104 |
user: "{{ _namespace }}" |
|
105 |
password: "{{ _account_password }}" |
|
106 |
force_basic_auth: true |
|
107 |
register: gitea_repo_kclient |
2282af
|
108 |
ignore_errors: true |
ddd690
|
109 |
|
GH |
110 |
- name: Get gitea user info |
|
111 |
uri: |
|
112 |
url: "https://{{ gitea_route.stdout }}/api/v1/users/{{ _namespace }}" |
|
113 |
method: GET |
|
114 |
validate_certs: false |
|
115 |
user: "{{ _namespace }}" |
|
116 |
password: "{{ _account_password }}" |
|
117 |
force_basic_auth: true |
|
118 |
register: gitea_insystem_user |
2282af
|
119 |
|
05c8bb
|
120 |
- name: Deploy proactive-fraud-detection-bucketrepo into gitea |
2282af
|
121 |
uri: |
GH |
122 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
123 |
method: POST |
|
124 |
body: "{{ body }}" |
|
125 |
status_code: 201 |
|
126 |
body_format: json |
|
127 |
validate_certs: false |
ddd690
|
128 |
user: "{{ _namespace }}" |
2282af
|
129 |
password: "{{ _account_password }}" |
GH |
130 |
force_basic_auth: true |
05c8bb
|
131 |
when: gitea_repo_bucketrepo.status == 404 |
2282af
|
132 |
vars: |
ddd690
|
133 |
body: '{ |
05c8bb
|
134 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-bucketrepo.git", |
GH |
135 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-bucketrepo.git", |
|
136 |
"repo_name": "proactive-fraud-detection-bucketrepo", |
ddd690
|
137 |
"uid": {{ gitea_insystem_user.json.id | int }} |
GH |
138 |
}' |
05c8bb
|
139 |
|
GH |
140 |
- name: Deploy proactive-fraud-detection-doc into gitea |
|
141 |
uri: |
|
142 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
143 |
method: POST |
|
144 |
body: "{{ body }}" |
|
145 |
status_code: 201 |
|
146 |
body_format: json |
|
147 |
validate_certs: false |
|
148 |
user: "{{ _namespace }}" |
|
149 |
password: "{{ _account_password }}" |
|
150 |
force_basic_auth: true |
|
151 |
when: gitea_repo_doc.status == 404 |
|
152 |
vars: |
|
153 |
body: '{ |
|
154 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-doc.git", |
|
155 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-doc.git", |
|
156 |
"repo_name": "proactive-fraud-detection-doc", |
|
157 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
158 |
}' |
|
159 |
- name: Deploy proactive-fraud-detection-fuse into gitea |
|
160 |
uri: |
|
161 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
162 |
method: POST |
|
163 |
body: "{{ body }}" |
|
164 |
status_code: 201 |
|
165 |
body_format: json |
|
166 |
validate_certs: false |
|
167 |
user: "{{ _namespace }}" |
|
168 |
password: "{{ _account_password }}" |
|
169 |
force_basic_auth: true |
|
170 |
when: gitea_repo_fuse.status == 404 |
|
171 |
vars: |
|
172 |
body: '{ |
|
173 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-fuse.git", |
|
174 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-fuse.git", |
|
175 |
"repo_name": "proactive-fraud-detection-fuse", |
|
176 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
177 |
}' |
|
178 |
|
|
179 |
- name: Deploy proactive-fraud-detection-kafka into gitea |
|
180 |
uri: |
|
181 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
182 |
method: POST |
|
183 |
body: "{{ body }}" |
|
184 |
status_code: 201 |
|
185 |
body_format: json |
|
186 |
validate_certs: false |
|
187 |
user: "{{ _namespace }}" |
|
188 |
password: "{{ _account_password }}" |
|
189 |
force_basic_auth: true |
|
190 |
when: gitea_repo_kafka.status == 404 |
|
191 |
vars: |
|
192 |
body: '{ |
|
193 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-kafka.git", |
|
194 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-kafka.git", |
|
195 |
"repo_name": "proactive-fraud-detection-kafka", |
|
196 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
197 |
}' |
|
198 |
|
|
199 |
- name: Deploy proactive-fraud-detection-dmn into gitea |
|
200 |
uri: |
|
201 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
202 |
method: POST |
|
203 |
body: "{{ body }}" |
|
204 |
status_code: 201 |
|
205 |
body_format: json |
|
206 |
validate_certs: false |
|
207 |
user: "{{ _namespace }}" |
|
208 |
password: "{{ _account_password }}" |
|
209 |
force_basic_auth: true |
|
210 |
when: gitea_repo_dmn.status == 404 |
|
211 |
vars: |
|
212 |
body: '{ |
|
213 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-dmn.git", |
|
214 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-dmn.git", |
|
215 |
"repo_name": "proactive-fraud-detection-dmn", |
|
216 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
217 |
}' |
|
218 |
|
|
219 |
- name: Deploy proactive-fraud-detection-case into gitea |
|
220 |
uri: |
|
221 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
222 |
method: POST |
|
223 |
body: "{{ body }}" |
|
224 |
status_code: 201 |
|
225 |
body_format: json |
|
226 |
validate_certs: false |
|
227 |
user: "{{ _namespace }}" |
|
228 |
password: "{{ _account_password }}" |
|
229 |
force_basic_auth: true |
|
230 |
when: gitea_repo_case.status == 404 |
|
231 |
vars: |
|
232 |
body: '{ |
|
233 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-case.git", |
|
234 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-case.git", |
|
235 |
"repo_name": "proactive-fraud-detection-case", |
|
236 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
237 |
}' |
|
238 |
|
|
239 |
- name: Deploy proactive-fraud-detection-kclient into gitea |
|
240 |
uri: |
|
241 |
url: "https://{{ gitea_route.stdout }}/api/v1/repos/migrate" |
|
242 |
method: POST |
|
243 |
body: "{{ body }}" |
|
244 |
status_code: 201 |
|
245 |
body_format: json |
|
246 |
validate_certs: false |
|
247 |
user: "{{ _namespace }}" |
|
248 |
password: "{{ _account_password }}" |
|
249 |
force_basic_auth: true |
|
250 |
when: gitea_repo_kclient.status == 404 |
|
251 |
vars: |
|
252 |
body: '{ |
|
253 |
"clone_addr": "https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-kclient.git", |
|
254 |
"description": "Mirrored from https://gitlab.com/2020-summit-labs/proactive-fraud-detection/proactive-fraud-detection-kclient.git", |
|
255 |
"repo_name": "proactive-fraud-detection-kclient", |
|
256 |
"uid": {{ gitea_insystem_user.json.id | int }} |
|
257 |
}' |