forked from ilios/ilios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
622 lines (588 loc) · 28.5 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<?xml version="1.0" encoding="UTF-8"?>
<!-- Phing buildfile for Ilios -->
<!--
Usage:
1. Copy the /build.properties.sample file and configure the copied file accordingly.
2. Execute phing by providing the path to the property file (mandatory) and the name of the build target (optional).
If no build target is provided, the default "build-and-deploy" target will be assumed and executed.
Example:
$ cp build.properties.sample ~/ilios-stage.properties
$ bin/phing -propertyfile ~/iios-stage.properties build
3. Certain sub-targets may be omitted by setting "skip" properties.
'skip-prompt' ... if set to "true" then the user will not be prompted for comfirmation before code is deployed.
'skip-setup-zero-user' ... if set to "true" then no "zero-user" account will be created during db installation.
'skip-db-backup' ... 'if set to "true" then no db backup is perform prior to a db update.
Tips:
1. Make certain that you db.user has ALL privileges necessary. Because ilios uses stored procedures,
you must 'GRANT CREATE ROUTINE ON db.name.* TO [email protected]' IN ADDITION TO the normal "GRANT ALL..."
2. You may want to keep multiple property files around, one for each environment (dev/stage/prod).
3. Run the "deploy" and "build-and-deploy" targets with elevated privileges ('sudo') if your deployment directory is owned by 'root'
Example:
$ sudo bin/phing -propertyfile build.properties build-and-deploy
4. You can directly provide the package bundle as command line argument "packagefilepath" to the "deploy" target
Example:
$ bin/phing -propertyfile build.properties -Dpackagefilepath=/path/to/your/ilios/package.tar.gz deploy
Todo:
PHPDoc integration
See:
http://www.phing.info/docs/guide/stable/
-->
<project name="ilios" basedir="." default="build-and-deploy">
<property name="webdir" value="${project.basedir}/web" override="true" />
<!-- capture current date/time info -->
<php function="time" returnProperty="now" />
<tstamp>
<format property="DSTAMP" pattern="%F" />
<format property="TSTAMP" pattern="%H-%M-%S" />
<format property="TODAY" pattern="%c" locale="en_US" />
</tstamp>
<!-- Fileset for all source files -->
<fileset dir="${webdir}" id="webfiles">
<exclude name="tmp_uploads/" />
<exclude name="learning_materials/" />
<exclude name="static/" />
<exclude name="application/logs/" />
<exclude name="application/cache/" />
</fileset>
<!-- ============================================ -->
<!-- Target: build-and-deploy (DEFAULT) -->
<!-- ============================================ -->
<target name="build-and-deploy" depends="build,deploy"
description="builds and deploys the application">
</target>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="copy,configure,package"
description="configures and bundles the code base for deployment">
</target>
<!-- ============================================ -->
<!-- Target: copy -->
<!-- ============================================ -->
<target name="copy"
description="copies the files from the /web directory to the build directory">
<!-- sanity check: verify that build dir has been specified -->
<if>
<not>
<isset property="builddir" />
</not>
<then>
<fail message="No build directory was specified." />
</then>
</if>
<!-- delete old build directory if it already exists-->
<if>
<available file="${builddir}" type="dir" />
<then>
<delete dir="${builddir}" includeemptydirs="true" failonerror="true" />
</then>
</if>
<!-- re-create build directory -->
<mkdir dir="${builddir}" />
<!-- copy codebase to build directory -->
<copy todir="${builddir}">
<fileset refid="webfiles" />
</copy>
<!-- create log, cache and upload directories -->
<mkdir dir="${builddir}/tmp_uploads" />
<mkdir dir="${builddir}/application/logs" />
<mkdir dir="${builddir}/application/cache" />
<mkdir dir="${builddir}/learning_materials" />
<mkdir dir="${builddir}/static" />
<!-- copy index files and .htaccess files to log and cache directories -->
<copy todir="${builddir}/application/cache">
<filelist dir="${webdir}/application/cache" files="index.html,.htaccess"/>
</copy>
<copy todir="${builddir}/application/logs">
<filelist dir="${webdir}/application/logs" files="index.html" />
</copy>
<!-- drop .htaccess files into the upload dirs -->
<touch file="${builddir}/tmp_uploads/.htaccess" />
<append destFile="${builddir}/tmp_uploads/.htaccess"
text="Options -Indexes" />
<touch file="${builddir}/learning_materials/.htaccess" />
<append destFile="${builddir}/learning_materials/.htaccess"
text="Options -Indexes" />
<!-- explicity set file and directory permissions -->
<exec command="find ${builddir} -type d -exec chmod 755 {} \;" escape="false" />
<exec command="find ${builddir} -type f -exec chmod 644 {} \;" escape="false" />
</target>
<!-- ============================================ -->
<!-- Target: configure -->
<!-- ============================================ -->
<target name="configure"
description="(over)writes configuration parameters to various files of the application">
<!-- copy/rename default.config.php to config.php and substitute placeholder token -->
<copy file="${builddir}/application/config/default.config.php"
tofile="${builddir}/application/config/config.php"
overwrite="true">
<filterchain>
<replacetokens begintoken="%%" endtoken="%%">
<token key="ENCRYPTION_KEY" value="${encryption_key}" />
</replacetokens>
</filterchain>
</copy>
<!-- copy/rename default.database.php to database.php and substitute placeholder token -->
<copy file="${builddir}/application/config/default.database.php"
tofile="${builddir}/application/config/database.php"
overwrite="true">
<filterchain>
<replacetokens begintoken="%%" endtoken="%%">
<token key="DBGROUP" value="${db.group}" />
<token key="DBHOSTNAME" value="${db.hostname}" />
<token key="DBUSERNAME" value="${db.username}" />
<token key="DBNAME" value="${db.name}" />
<token key="DBPASSWORD" value="${db.password}" />
</replacetokens>
</filterchain>
</copy>
<!-- copy/rename default.ilios.php to ilios.php and substitute placeholder token -->
<copy file="${builddir}/application/config/default.ilios.php"
tofile="${builddir}/application/config/ilios.php"
overwrite="true">
<filterchain>
<replacetokens begintoken="%%" endtoken="%%">
<token key="ILIOS_INSTITUTION_NAME" value="${institution_name}" />
<token key="ILIOS_INSTITUTION_DOMAIN" value="${institution_domain}" />
<token key="ILIOS_REVISION" value="${now}" />
<token key="USERSYNC_LDAP_HOSTNAME" value="${tasks.user_sync.ldap.hostname}" />
<token key="USERSYNC_LDAP_BINDDN" value="${tasks.user_sync.ldap.binddn}" />
<token key="USERSYNC_LDAP_PASSWORD" value="${tasks.user_sync.ldap.password}" />
</replacetokens>
</filterchain>
</copy>
<!-- copy/rename default.index.php to index.php and substitute placeholder token -->
<copy file="${builddir}/default.index.php"
tofile="${builddir}/index.php"
overwrite="true">
<filterchain>
<replacetokens begintoken="%%" endtoken="%%">
<token key="ILIOS_REVISION" value="${now}" />
</replacetokens>
</filterchain>
</copy>
<!-- append configuration overwites to application/config/ilios.php -->
<append destFile="${builddir}/application/config/ilios.php"
text="${line.separator}//${line.separator}// Configuration overwrites below were added by the automated build process on ${TODAY} ${line.separator}//${line.separator}"/>
<if>
<isset property="ilios_idle_page_timeout" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['ilios_idle_page_timeout'] = ${ilios_idle_page_timeout};${line.separator}" />
</then>
</if>
<if>
<isset property="ilios_authentication" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['ilios_authentication'] = '${ilios_authentication}';${line.separator}" />
</then>
</if>
<if>
<isset property="curriculum_inventory_supporting_link" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['curriculum_inventory_supporting_link'] = '${curriculum_inventory_supporting_link}';${line.separator}" />
</then>
</if>
<if>
<isset property="visual_alert_threshold_in_days" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['visual_alert_threshold_in_days'] = ${visual_alert_threshold_in_days};${line.separator}" />
</then>
</if>
<if>
<isset property="script_aggregation_enabled" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['script_aggregation_enabled'] = ${script_aggregation_enabled};${line.separator}" />
</then>
</if>
<if>
<isset property="tasks.change_alerts.enabled" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['tasks']['change_alerts']['enabled'] = ${tasks.change_alerts.enabled};${line.separator}" />
</then>
</if>
<if>
<isset property="tasks.teaching_reminders.enabled" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['tasks']['teaching_reminders']['enabled'] = ${tasks.teaching_reminders.enabled};${line.separator}" />
</then>
</if>
<if>
<isset property="tasks.user_sync.enabled" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['tasks']['user_sync']['enabled'] = ${tasks.user_sync.enabled};${line.separator}" />
</then>
</if>
<if>
<isset property="tasks.enrollment_export.enabled" />
<then>
<append destFile="${builddir}/application/config/ilios.php"
text="$config['tasks']['enrollment_export']['enabled'] = ${tasks.enrollment_export.enabled};${line.separator}" />
</then>
</if>
</target>
<!-- ============================================ -->
<!-- Target: package -->
<!-- ============================================ -->
<target name="package" depends="configure"
description="tars up the build directory for deployment">
<!-- sanity check: verify that package dir has been specified -->
<if>
<not>
<isset property="packagedir" />
</not>
<then>
<fail message="No package directory was specified." />
</then>
</if>
<!-- capture the file name and full file path of the deployment bundle for later use -->
<property name="packagefile" value="${phing.project.name}_${DSTAMP}_${TSTAMP}.tar.gz" />
<property name="packagefilepath" value="${packagedir}/${packagefile}" />
<mkdir dir="${packagedir}" />
<tar destfile="${packagefilepath}" includeemptydirs="true" compression="gzip">
<fileset dir="${builddir}">
<!-- do not include the config file templates -->
<exclude name="application/config/default.config.php" />
<exclude name="application/config/default.database.php" />
<exclude name="application/config/default.ilios.php" />
<exclude name="default.index.php" />
</fileset>
</tar>
<echo>Deployment DB: ${db.name}</echo>
</target>
<!-- ============================================ -->
<!-- Target: cleanup -->
<!-- ============================================ -->
<target name="cleanup"
description="removes the build and package directory">
<delete dir="${builddir}" includeemptydirs="true" failonerror="true" />
<delete dir="${packagedir}" includeemptydirs="true" failonerror="true" />
</target>
<!-- ============================================ -->
<!-- Target: deploy-prepare -->
<!-- ============================================ -->
<target name="deploy-prepare"
description="pre-deployment input validation and user confirmation">
<!-- sanity check: verify that deployment dir has been specified -->
<if>
<not>
<isset property="deploydir" />
</not>
<then>
<fail message="No deployment directory was specified." />
</then>
</if>
<!-- verify that the given deployment bundle exists. if not abort mission -->
<if>
<not>
<available file="${packagefilepath}" type="file" />
</not>
<then>
<fail message="Deployment bundle ${packagefilepath} not found." />
</then>
</if>
<!--
Check if build property "skip-prompt" exists and equals "true".
If so, then skip user prompt.
Otherwise, solicit confirmation from the user before proceeding.
-->
<if>
<not>
<and>
<isset property="skip-prompt" />
<istrue value="${skip-prompt}" />
</and>
</not>
<then>
<input propertyname="proceed" defaultValue="n" promptChar="?" validArgs="Y,n">
Deploy Ilios-bundle ${packagefilepath} to "${deploydir}" directory and "${db.name}" database
</input>
<if>
<not>
<equals arg1="${proceed}" arg2="Y" />
</not>
<then>
<fail message="Aborting deployment." />
</then>
</if>
</then>
</if>
</target>
<!-- ============================================ -->
<!-- Target: deploy -->
<!-- ============================================ -->
<target name="deploy" depends="deploy-prepare,backup"
description="(re)deploys the code to a given destination directory and installs/updates the database.">
<property name="db_exists" value="true" />
<property name="mysql_conf_file" value="${builddir}/tmp.my.cnf" />
<!-- either create a deployment directory (if non-existent), or gut the existing one -->
<if>
<available file="${deploydir}" type="dir" />
<then>
<delete includeemptydirs="true" failonerror="true">
<fileset dir="${deploydir}">
<!-- keep log files and user uploads -->
<exclude name="tmp_uploads/**" />
<exclude name="learning_materials/**" />
<exclude name="application/logs/**" />
</fileset>
</delete>
</then>
<else>
<mkdir dir="${deploydir}" />
</else>
</if>
<!-- extract the deployment bundle into the deployment directory -->
<untar file="${packagefilepath}" todir="${deploydir}" forceExtract="false" />
<!-- change file ownership on upload-, log- and cache-directories -->
<chown file="${deploydir}/tmp_uploads" user="${webuser}" group="${webgroup}" />
<chown file="${deploydir}/learning_materials" user="${webuser}" group="${webgroup}" />
<chown file="${deploydir}/application/logs" user="${webuser}" group="${webgroup}" />
<chown file="${deploydir}/application/cache" user="${webuser}" group="${webgroup}" />
<chown file="${deploydir}/static" user="${webuser}" group="${webgroup}" />
<!-- create a temp config file to store the db password in. -->
<phingcall target="create-mysql-conf-file">
<property name="mysql_conf_file" value="${mysql_conf_file}" />
</phingcall>
<!-- hokey way of checking if the database already exists or not -->
<trycatch property="db_error">
<try>
<!-- attempt to connect and run a query against the given database -->
<!-- <pdosqlexec url="mysql:host=${db.hostname};dbname=${db.name}"
userid="${db.username}" password="${db.password}">
SELECT true;
</pdosqlexec> -->
<exec command="mysql --defaults-extra-file=${mysql_conf_file} -u ${db.username} -h ${db.hostname} ${db.name} -e 'USE ${db.name};'" checkreturn="true" logoutput="true" />
</try>
<catch>
<!--
DB error.
Assume that the specified database does not exist.
Toggle the "db-exists" flag to FALSE.
TODO:
parse the db error message if it indeed contains "Unknown Database"
or perhaps a specific error code that indicates the same failure.
-->
<echo msg="${db_error}" />
<property name="db_exists" value="false" override="true" />
</catch>
<finally>
<!-- clean up -->
<delete file="${mysql_conf_file}" />
</finally>
</trycatch>
<!-- update or install db -->
<if>
<istrue value="${db_exists}" />
<then>
<phingcall target="db-update" />
</then>
<else>
<phingcall target="db-install" />
</else>
</if>
</target>
<!-- ============================================ -->
<!-- Target: backup -->
<!-- ============================================ -->
<target name="backup"
description="backs-up the deployment directory (if existent)">
<if>
<available file="${deploydir}" type="dir" />
<then>
<!-- sanity check: verify that backup dir has been specified -->
<if>
<not>
<isset property="backupdir" />
</not>
<then>
<fail message="No backupdir directory was specified." />
</then>
</if>
<property name="backupfile"
value="${backupdir}/${phing.project.name}_backup_${DSTAMP}_${TSTAMP}.tar.gz" />
<mkdir dir="${backupdir}" />
<tar destfile="${backupfile}" includeemptydirs="true" compression="gzip">
<fileset dir="${deploydir}">
<!-- exclude log-, cache- and user-upload-files from backup -->
<exclude name="tmp_uploads/" />
<exclude name="learning_materials/" />
<exclude name="application/logs/" />
<exclude name="application/cache/" />
<exclude name="static/" />
</fileset>
</tar>
</then>
<else>
<echo>No pre-existing deployment dir "${deploydir}" found, skipping backup.</echo>
</else>
</if>
</target>
<!-- ============================================ -->
<!-- Target: db-update -->
<!-- ============================================ -->
<target name="db-update" description="Updates the Ilios database.">
<!-- back up database unless indicated otherwise -->
<if>
<not>
<and>
<isset property="skip-db-backup" />
<istrue value="${skip-db-backup}" />
</and>
</not>
<then>
<phingcall target="db-backup" />
</then>
</if>
<exec command="php ilios.php migrate" dir="${deploydir}" logoutput="true"/>
</target>
<!-- ============================================ -->
<!-- Target: db-install -->
<!-- ============================================ -->
<target name="db-install" description="Installs the Ilios database.">
<property name="db_install_dir" value="${project.basedir}/database/install" />
<property name="db_install_file_template" value="${db_install_dir}/make_new_ilios_database.sql" />
<property name="db_install_file" value="${db_install_dir}/tmp.make_new_ilios_database.sql" />
<property name="mysql_conf_file" value="${db_install_dir}/tmp.my.cnf" />
<copy file="${db_install_file_template}"
tofile="${db_install_file}"
overwrite="true">
<filterchain>
<replaceregexp>
<regexp pattern="XXXXXX" replace="${db.name}" />
</replaceregexp>
</filterchain>
</copy>
<!-- create a temp config file to store the db password in. -->
<phingcall target="create-mysql-conf-file">
<property name="mysql_conf_file" value="${mysql_conf_file}" />
</phingcall>
<!-- create db schema and import default data -->
<trycatch>
<try>
<exec command="mysql --defaults-extra-file=${mysql_conf_file} -u ${db.username} -h ${db.hostname} < ${db_install_file}"
dir="${db_install_dir}" checkreturn="true" logoutput="true" />
</try>
<finally>
<!-- clean up -->
<delete file="${mysql_conf_file}" />
<delete file="${db_install_file}" />
</finally>
</trycatch>
<!-- invoke zero user setup target unless indicated otherwise -->
<if>
<not>
<and>
<isset property="skip-setup-zero-user" />
<istrue value="${skip-setup-zero-user}" />
</and>
</not>
<then>
<phingcall target="setup-zero-user" />
</then>
</if>
</target>
<!-- ============================================ -->
<!-- Target: db-backup -->
<!-- ============================================ -->
<target name="db-backup" description="Backs up the database.">
<property name="mysql_conf_file" value="${db_backupdir}/tmp.my.cnf" />
<property name="db_backup_file" value="${db_backupdir}/${phing.project.name}_db_backup_${DSTAMP}_${TSTAMP}.sql.gz" />
<!-- create the backup dir on demand -->
<if>
<not>
<available file="${db_backupdir}" type="dir" />
</not>
<then>
<mkdir dir="${db_backupdir}" />
</then>
</if>
<!-- create a temp config file to store the db password in. -->
<phingcall target="create-mysql-conf-file">
<property name="mysql_conf_file" value="${mysql_conf_file}" />
</phingcall>
<!-- dump out the database and compress the output -->
<trycatch>
<try>
<exec command="mysqldump --defaults-extra-file=${mysql_conf_file} -u ${db.username} -h ${db.hostname} --default-character-set=latin1 -R ${db.name} | gzip -c | cat > ${db_backup_file}" checkreturn="true" logoutput="true" />
</try>
<finally>
<delete file="${mysql_conf_file}" />
</finally>
</trycatch>
</target>
<!-- ============================================ -->
<!-- Target: create-mysql-conf-file -->
<!-- ============================================ -->
<target name="create-mysql-conf-file"
description="Creates a temporary config file that can be used to store credentials for mysql/mysqldump calls.">
<!--
How and why to use a temp. conf file instead of passing the password as command line argument.
@link http://dev.mysql.com/doc/refman/5.5/en/password-security-user.htm
@link http://dev.mysql.com/doc/refman/5.5/en/option-files.html
-->
<if>
<available file="${mysql_conf_file}" />
<then>
<delete file="${mysql_conf_file}" />
</then>
</if>
<touch file="${mysql_conf_file}" />
<chmod file="${mysql_conf_file}" mode="0600" />
<append destFile="${mysql_conf_file}">
[client]
password="${db.password}"
</append>
</target>
<!-- ============================================ -->
<!-- Target: setup-zero-user -->
<!-- ============================================ -->
<target name="setup-zero-user" description="Creates a default user account (the 'zero-user') in the database.">
<!--
This is essentially replicating the 'database/install/install_zero_user.sh' shell-script.
TODO: See if this target can share some code with the corresponding shell-script. DRY!
-->
<!-- generate a password hash -->
<php function="hash" returnProperty="password_hash">
<param value="sha256" />
<param value="${db_install.zero_user.password}" />
</php>
<!--
Lame-o output escaping, since neither PDO's prepared statements
nor mysqli_real_escape_string() are available at this point to phing.
At least this will take care of quotes.
-->
<php function="addslashes" returnProperty="escaped_first_name">
<param value="${db_install.zero_user.first_name}" />
</php>
<php function="addslashes" returnProperty="escaped_last_name">
<param value="${db_install.zero_user.last_name}" />
</php>
<php function="addslashes" returnProperty="escaped_email">
<param value="${db_install.zero_user.email}" />
</php>
<php function="addslashes" returnProperty="escaped_login">
<param value="${db_install.zero_user.login}" />
</php>
<php function="intval" returnProperty="escaped_school_id">
<param value="${db_install.zero_user.school_id}" />
<param value="10" />
</php>
<!-- run the SQL transaction that creates the zero user -->
<pdosqlexec url="mysql:host=${db.hostname};dbname=${db.name}"
userid="${db.username}" password="${db.password}">
<transaction>
INSERT INTO user (user_id, first_name, middle_name, last_name, email, primary_school_id, added_via_ilios, enabled, examined, user_sync_ignore) VALUES (1, '${escaped_last_name}', '', '${escaped_first_name}', '${escaped_email}', ${escaped_school_id}, 1, 1, 0, 0);
INSERT INTO user_x_user_role (user_id, user_role_id) VALUES (1, 1);
INSERT INTO authentication (person_id, password_sha256, username) VALUES (1, '${password_hash}', '${escaped_login}');
</transaction>
</pdosqlexec>
</target>
</project>