Skip to content

Commit 4c9afb6

Browse files
committed
feat(build-tests): add Phase 1 dry-run regression suite for demo_build.sh
Phase 1 of issue #146: per-PR regression coverage that catches the PR #142 (printf '-' dash) and PR #145 (SC2115 rm -fr footguns) class of bug at PR time in seconds, rather than waiting for the nightly host reset to surface them. Three pieces: - demo_build.sh: additive --dry-run flag + ACTION_LOG emitter (run_action / run_action_sh / run_action_capture helpers). With no flag and no ACTION_LOG env, helpers degrade to plain exec -- production behavior is unchanged. - tools/build-tests/: fixture-test harness mirroring the tools/auto-derive/fixtures-and-tests/ pattern. 6 scenarios cover branch-pinned/tag-pinned/release-packageserve/fork-URL/ light-reset/multi-demo paths. - .github/workflows/build-tests.yml: runs the suite on every PR that touches demo_build.sh or tools/build-tests/**. Phase 2 (separate PR) will add a slower nightly job that actually executes demo_build.sh end-to-end against a compose stack, reusing the same fixtures + action-log emitter, and asserting the dry-run log matches what live execution produces -- the integrity check that keeps Phase 1 honest. Refs: #146 Assisted-by: Claude Code
1 parent 000d131 commit 4c9afb6

24 files changed

Lines changed: 877 additions & 114 deletions

File tree

.github/workflows/build-tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build-tests (dry-run)
2+
3+
# Phase 1 of issue #146: per-PR regression coverage for demo_build.sh.
4+
#
5+
# Runs `demo_build.sh --dry-run` against each fixture in
6+
# tools/build-tests/fixtures/ and diffs the captured action log against
7+
# the golden. Catches the PR #142 / #145 class of bug (control-flow,
8+
# field-index, quoting) at PR time, in seconds rather than minutes.
9+
#
10+
# Phase 2 (separate PR, future) will add a slower nightly job that
11+
# actually executes the script end-to-end against a compose stack;
12+
# this fast job is the per-PR signal.
13+
#
14+
# Workflow path includes derive-ip-map.yml because the auto-derive bot
15+
# can land changes to demo_build.sh / ip_map_branch.txt — those should
16+
# trigger this suite too.
17+
18+
on:
19+
pull_request:
20+
paths:
21+
- demo_build.sh
22+
- tools/build-tests/**
23+
- .github/workflows/build-tests.yml
24+
workflow_dispatch:
25+
26+
jobs:
27+
dry-run:
28+
runs-on: ubuntu-24.04
29+
permissions:
30+
contents: read
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v7
34+
with:
35+
persist-credentials: false
36+
37+
- name: Run fixture test suite
38+
run: |
39+
set -euo pipefail
40+
./tools/build-tests/test.sh

.shellcheckrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ disable=SC3014 # `==` in place of `=`
3333
disable=SC3028 # `RANDOM` undefined
3434
disable=SC3030 # arrays undefined
3535
disable=SC3037 # `echo` flags undefined
36+
disable=SC3043 # `local` undefined -- used by the build-tests helpers added in #146
37+
disable=SC3050 # `printf %q` undefined -- used by the build-tests action-log emitter (#146)
3638
disable=SC3054 # array references undefined
3739

3840
# Pre-existing bash warnings deferred to follow-up cleanup PRs.

demo_build.sh

100644100755
Lines changed: 207 additions & 114 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
ACTION: apk add --no-cache postfix stunnel
2+
ACTION_SH: echo 'error_log = <WORK>/web/log/logPhp.txt' > /etc/php85/conf.d/99-demo-farm-error-log.ini
3+
ACTION: git clone --branch master --depth 1 https://github.com/openemr/openemr.git
4+
ACTION_SH: rm -fr "<WORK>/web/openemr"/*
5+
ACTION_SH: rsync --recursive --exclude .git <WORK>/git/openemr/* <WORK>/web/openemr/
6+
ACTION: rm -fr <WORK>/git/openemr
7+
ACTION: chmod 666 <WORK>/web/openemr/sites/default/sqlconf.php
8+
ACTION: chmod -R a+w <WORK>/web/openemr/sites/default/documents
9+
ACTION_CAPTURE: cat /home/openemr/github-key
10+
ACTION_CAPTURE: curl -H Authorization:\ token\ \<DRY_RUN_GITHUB_KEY\> https://api.github.com/rate_limit
11+
ACTION_SH: composer install --no-dev &>> <WORK>/web/log/logSetup.txt
12+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
13+
ACTION_SH: npm run build &>> <WORK>/web/log/logSetup.txt
14+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
15+
ACTION_SH: composer global require phing/phing &>> <WORK>/web/log/logSetup.txt
16+
ACTION_SH: /root/.composer/vendor/bin/phing vendor-clean &>> <WORK>/web/log/logSetup.txt
17+
ACTION_SH: /root/.composer/vendor/bin/phing assets-clean &>> <WORK>/web/log/logSetup.txt
18+
ACTION_SH: composer global remove phing/phing &>> <WORK>/web/log/logSetup.txt
19+
ACTION_SH: composer dump-autoload -o &>> <WORK>/web/log/logSetup.txt
20+
ACTION_SH: sed -e 's@^exit;@ @' <<WORK>/web/openemr/contrib/util/installScripts/InstallerAuto.php ><WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php
21+
ACTION_SH: su -p -s /bin/sh "root" -c "php -f <WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php development_translations=yes rootpass=hey server=mysql loginhost=% login=two pass=two dbname=two" >> <WORK>/web/log/logSetup.txt
22+
ACTION: rm -f <WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php
23+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ two.globals\ SET\ gl_value=\'https://two.openemr.io\'\ WHERE\ gl_name=\'site_addr_oath\'
24+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ two.globals\ SET\ gl_value=\'\<RANDOM_THEME_2\>\'\ WHERE\ gl_name=\'css_header\'
25+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e $'\n UPDATE two.globals SET gl_value=\'1\' WHERE gl_name=\'portal_onsite_two_enable\';\n UPDATE two.globals SET gl_value=\'1\' WHERE gl_name=\'rest_api\';\n UPDATE two.globals SET gl_value=\'1\' WHERE gl_name=\'rest_fhir_api\';\n UPDATE two.globals SET gl_value=\'1\' WHERE gl_name=\'rest_portal_api\';\n UPDATE two.globals SET gl_value=\'3\' WHERE gl_name=\'oauth_password_grant\';\n UPDATE two.globals SET gl_value=\'1\' WHERE gl_name=\'rest_system_scopes_api\';\n UPDATE two.globals SET gl_value=\'3\' WHERE gl_name=\'ccda_alt_service_enable\';\n '
26+
ACTION: chmod 644 <WORK>/web/openemr/sites/default/sqlconf.php
27+
ACTION: mkdir <WORK>/web/openemr/sites/default/procedure_results
28+
ACTION: chmod -R a+w <WORK>/web/openemr/sites/default/procedure_results
29+
ACTION: sed -i s@/apis/default/@/openemr/apis/default/@ <WORK>/web/openemr/swagger/openemr-api.yaml
30+
ACTION: sed -i s@/oauth2/default/authorize@/openemr/oauth2/default/authorize@ <WORK>/web/openemr/swagger/openemr-api.yaml
31+
ACTION: sed -i s@/oauth2/default/token@/openemr/oauth2/default/token@ <WORK>/web/openemr/swagger/openemr-api.yaml
32+
ACTION: rm -f <WORK>/web/openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php
33+
ACTION_SH: stunnel /etc/stunnel/stunnel.conf >> <WORK>/web/log/logSetup.txt
34+
ACTION_SH: postfix start >> <WORK>/web/log/logSetup.txt
35+
ACTION: cp <WORK>/git/demo_farm_openemr/openemr-alpine.conf /etc/apache2/conf.d/openemr.conf
36+
ACTION_SH: httpd -k start >> <WORK>/web/log/logSetup.txt
37+
ACTION: tail -F -n0 /etc/hosts
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Scenario: branch-pinned (master) cluster with development translations,
2+
# patient-portal/API globals, and random theme (funStuff=2 -> ThemeTwo).
3+
# Exercises: git clone --branch master, translationsDevelopment branch,
4+
# random theme branch, ppapi globals branch.
5+
DOCKERDEMO=two
6+
DOCKERMYSQLHOST=mysql
7+
PHP_VERSION_ABBR=85
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docker_number openemr_repo branch serve_development_translations(not used) use_development_translations serve_packages legacy_patching(not used) demo_data demo_ssh(not used) patient_portals_and_api external_link root_sql_pass branch_tag(not used) demo_data_upgrade_from fun_stuff pass_reset capsule description
2+
two https://github.com/openemr/openemr.git master 0 1 0 0 0 0 1 two.openemr.io hey 0 0 2 0 0 Branch-pinned master demo (with udt, ppapi, random theme)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ACTION: apk add --no-cache postfix stunnel
2+
ACTION_SH: echo 'error_log = <WORK>/web/log/logPhp.txt' > /etc/php85/conf.d/99-demo-farm-error-log.ini
3+
ACTION: git clone --branch master --depth 1 https://github.com/openemr/openemr.git
4+
ACTION_SH: rm -fr "<WORK>/web/a/openemr"/*
5+
ACTION_SH: rsync --recursive --exclude .git <WORK>/git/openemr/* <WORK>/web/a/openemr/
6+
ACTION: rm -fr <WORK>/git/openemr
7+
ACTION: chmod 666 <WORK>/web/a/openemr/sites/default/sqlconf.php
8+
ACTION: chmod -R a+w <WORK>/web/a/openemr/sites/default/documents
9+
ACTION_CAPTURE: cat /home/openemr/github-key
10+
ACTION_CAPTURE: curl -H Authorization:\ token\ \<DRY_RUN_GITHUB_KEY\> https://api.github.com/rate_limit
11+
ACTION_SH: composer install --no-dev &>> <WORK>/web/log/logSetup.txt
12+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
13+
ACTION_SH: npm run build &>> <WORK>/web/log/logSetup.txt
14+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
15+
ACTION_SH: composer global require phing/phing &>> <WORK>/web/log/logSetup.txt
16+
ACTION_SH: /root/.composer/vendor/bin/phing vendor-clean &>> <WORK>/web/log/logSetup.txt
17+
ACTION_SH: /root/.composer/vendor/bin/phing assets-clean &>> <WORK>/web/log/logSetup.txt
18+
ACTION_SH: composer global remove phing/phing &>> <WORK>/web/log/logSetup.txt
19+
ACTION_SH: composer dump-autoload -o &>> <WORK>/web/log/logSetup.txt
20+
ACTION_SH: sed -e 's@^exit;@ @' <<WORK>/web/a/openemr/contrib/util/installScripts/InstallerAuto.php ><WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php
21+
ACTION_SH: su -p -s /bin/sh "root" -c "php -f <WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php development_translations=yes rootpass=hey server=mysql loginhost=% login=two_a pass=two_a dbname=two_a" >> <WORK>/web/log/logSetup.txt
22+
ACTION: rm -f <WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php
23+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ two_a.globals\ SET\ gl_value=\'https://two.openemr.io\'\ WHERE\ gl_name=\'site_addr_oath\'
24+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e $'\n UPDATE two_a.globals SET gl_value=\'1\' WHERE gl_name=\'portal_onsite_two_enable\';\n UPDATE two_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_api\';\n UPDATE two_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_fhir_api\';\n UPDATE two_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_portal_api\';\n UPDATE two_a.globals SET gl_value=\'3\' WHERE gl_name=\'oauth_password_grant\';\n UPDATE two_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_system_scopes_api\';\n UPDATE two_a.globals SET gl_value=\'3\' WHERE gl_name=\'ccda_alt_service_enable\';\n '
25+
ACTION: chmod 644 <WORK>/web/a/openemr/sites/default/sqlconf.php
26+
ACTION: mkdir <WORK>/web/a/openemr/sites/default/procedure_results
27+
ACTION: chmod -R a+w <WORK>/web/a/openemr/sites/default/procedure_results
28+
ACTION: sed -i s@/apis/default/@/a/openemr/apis/default/@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
29+
ACTION: sed -i s@/oauth2/default/authorize@/a/openemr/oauth2/default/authorize@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
30+
ACTION: sed -i s@/oauth2/default/token@/a/openemr/oauth2/default/token@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
31+
ACTION: rm -f <WORK>/web/a/openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Scenario: light-reset of a single subdemo. The positional arg "a"
2+
# triggers lightReset=true; the script processes ONLY that subdemo and
3+
# skips the post-loop stunnel/postfix/cp/httpd/tail block. DOCKERDEMO=two
4+
# is the cluster's original; combined with subdemo "a" the actual lookup
5+
# key becomes "two_a" (per the script's $DOCKERDEMOORIGINAL_$demo logic).
6+
DOCKERDEMO=two
7+
DOCKERMYSQLHOST=mysql
8+
PHP_VERSION_ABBR=85
9+
EXTRA_ARGS=a
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docker_number openemr_repo branch serve_development_translations(not used) use_development_translations serve_packages legacy_patching(not used) demo_data demo_ssh(not used) patient_portals_and_api external_link root_sql_pass branch_tag(not used) demo_data_upgrade_from fun_stuff pass_reset capsule description
2+
two_a https://github.com/openemr/openemr.git master 0 1 0 0 0 0 1 two.openemr.io/a hey 0 0 0 0 0 Light-reset target subdemo
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
ACTION: apk add --no-cache postfix stunnel
2+
ACTION_SH: echo 'error_log = <WORK>/web/log/logPhp.txt' > /etc/php85/conf.d/99-demo-farm-error-log.ini
3+
ACTION: git clone --branch master --depth 1 https://github.com/openemr/openemr.git
4+
ACTION_SH: rm -fr "<WORK>/web/openemr"/*
5+
ACTION_SH: rsync --recursive --exclude .git <WORK>/git/openemr/* <WORK>/web/openemr/
6+
ACTION: rm -fr <WORK>/git/openemr
7+
ACTION: chmod 666 <WORK>/web/openemr/sites/default/sqlconf.php
8+
ACTION: chmod -R a+w <WORK>/web/openemr/sites/default/documents
9+
ACTION_CAPTURE: cat /home/openemr/github-key
10+
ACTION_CAPTURE: curl -H Authorization:\ token\ \<DRY_RUN_GITHUB_KEY\> https://api.github.com/rate_limit
11+
ACTION_SH: composer install --no-dev &>> <WORK>/web/log/logSetup.txt
12+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
13+
ACTION_SH: npm run build &>> <WORK>/web/log/logSetup.txt
14+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
15+
ACTION_SH: composer global require phing/phing &>> <WORK>/web/log/logSetup.txt
16+
ACTION_SH: /root/.composer/vendor/bin/phing vendor-clean &>> <WORK>/web/log/logSetup.txt
17+
ACTION_SH: /root/.composer/vendor/bin/phing assets-clean &>> <WORK>/web/log/logSetup.txt
18+
ACTION_SH: composer global remove phing/phing &>> <WORK>/web/log/logSetup.txt
19+
ACTION_SH: composer dump-autoload -o &>> <WORK>/web/log/logSetup.txt
20+
ACTION_SH: sed -e 's@^exit;@ @' <<WORK>/web/openemr/contrib/util/installScripts/InstallerAuto.php ><WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php
21+
ACTION_SH: su -p -s /bin/sh "root" -c "php -f <WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php rootpass=hey server=mysql loginhost=% login=seven pass=seven dbname=seven" >> <WORK>/web/log/logSetup.txt
22+
ACTION: rm -f <WORK>/web/openemr/contrib/util/installScripts/InstallerAutoTemp.php
23+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ seven.globals\ SET\ gl_value=\'https://seven.openemr.io\'\ WHERE\ gl_name=\'site_addr_oath\'
24+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e $'\n UPDATE seven.globals SET gl_value=\'1\' WHERE gl_name=\'portal_onsite_two_enable\';\n UPDATE seven.globals SET gl_value=\'1\' WHERE gl_name=\'rest_api\';\n UPDATE seven.globals SET gl_value=\'1\' WHERE gl_name=\'rest_fhir_api\';\n UPDATE seven.globals SET gl_value=\'1\' WHERE gl_name=\'rest_portal_api\';\n UPDATE seven.globals SET gl_value=\'3\' WHERE gl_name=\'oauth_password_grant\';\n UPDATE seven.globals SET gl_value=\'1\' WHERE gl_name=\'rest_system_scopes_api\';\n UPDATE seven.globals SET gl_value=\'3\' WHERE gl_name=\'ccda_alt_service_enable\';\n '
25+
ACTION: chmod 644 <WORK>/web/openemr/sites/default/sqlconf.php
26+
ACTION: mkdir <WORK>/web/openemr/sites/default/procedure_results
27+
ACTION: chmod -R a+w <WORK>/web/openemr/sites/default/procedure_results
28+
ACTION: sed -i s@/apis/default/@/openemr/apis/default/@ <WORK>/web/openemr/swagger/openemr-api.yaml
29+
ACTION: sed -i s@/oauth2/default/authorize@/openemr/oauth2/default/authorize@ <WORK>/web/openemr/swagger/openemr-api.yaml
30+
ACTION: sed -i s@/oauth2/default/token@/openemr/oauth2/default/token@ <WORK>/web/openemr/swagger/openemr-api.yaml
31+
ACTION: rm -f <WORK>/web/openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php
32+
ACTION: git clone --branch master --depth 1 https://github.com/openemr/openemr.git
33+
ACTION_SH: rm -fr "<WORK>/web/a/openemr"/*
34+
ACTION_SH: rsync --recursive --exclude .git <WORK>/git/openemr/* <WORK>/web/a/openemr/
35+
ACTION: rm -fr <WORK>/git/openemr
36+
ACTION: chmod 666 <WORK>/web/a/openemr/sites/default/sqlconf.php
37+
ACTION: chmod -R a+w <WORK>/web/a/openemr/sites/default/documents
38+
ACTION_CAPTURE: cat /home/openemr/github-key
39+
ACTION_CAPTURE: curl -H Authorization:\ token\ \<DRY_RUN_GITHUB_KEY\> https://api.github.com/rate_limit
40+
ACTION_SH: composer install --no-dev &>> <WORK>/web/log/logSetup.txt
41+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
42+
ACTION_SH: npm run build &>> <WORK>/web/log/logSetup.txt
43+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
44+
ACTION_SH: composer global require phing/phing &>> <WORK>/web/log/logSetup.txt
45+
ACTION_SH: /root/.composer/vendor/bin/phing vendor-clean &>> <WORK>/web/log/logSetup.txt
46+
ACTION_SH: /root/.composer/vendor/bin/phing assets-clean &>> <WORK>/web/log/logSetup.txt
47+
ACTION_SH: composer global remove phing/phing &>> <WORK>/web/log/logSetup.txt
48+
ACTION_SH: composer dump-autoload -o &>> <WORK>/web/log/logSetup.txt
49+
ACTION_SH: sed -e 's@^exit;@ @' <<WORK>/web/a/openemr/contrib/util/installScripts/InstallerAuto.php ><WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php
50+
ACTION_SH: su -p -s /bin/sh "root" -c "php -f <WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php rootpass=hey server=mysql loginhost=% login=seven_a pass=seven_a dbname=seven_a" >> <WORK>/web/log/logSetup.txt
51+
ACTION: rm -f <WORK>/web/a/openemr/contrib/util/installScripts/InstallerAutoTemp.php
52+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ seven_a.globals\ SET\ gl_value=\'https://seven.openemr.io\'\ WHERE\ gl_name=\'site_addr_oath\'
53+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e $'\n UPDATE seven_a.globals SET gl_value=\'1\' WHERE gl_name=\'portal_onsite_two_enable\';\n UPDATE seven_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_api\';\n UPDATE seven_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_fhir_api\';\n UPDATE seven_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_portal_api\';\n UPDATE seven_a.globals SET gl_value=\'3\' WHERE gl_name=\'oauth_password_grant\';\n UPDATE seven_a.globals SET gl_value=\'1\' WHERE gl_name=\'rest_system_scopes_api\';\n UPDATE seven_a.globals SET gl_value=\'3\' WHERE gl_name=\'ccda_alt_service_enable\';\n '
54+
ACTION: chmod 644 <WORK>/web/a/openemr/sites/default/sqlconf.php
55+
ACTION: mkdir <WORK>/web/a/openemr/sites/default/procedure_results
56+
ACTION: chmod -R a+w <WORK>/web/a/openemr/sites/default/procedure_results
57+
ACTION: sed -i s@/apis/default/@/a/openemr/apis/default/@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
58+
ACTION: sed -i s@/oauth2/default/authorize@/a/openemr/oauth2/default/authorize@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
59+
ACTION: sed -i s@/oauth2/default/token@/a/openemr/oauth2/default/token@ <WORK>/web/a/openemr/swagger/openemr-api.yaml
60+
ACTION: rm -f <WORK>/web/a/openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php
61+
ACTION: git clone --branch master --depth 1 https://github.com/openemr/openemr.git
62+
ACTION_SH: rm -fr "<WORK>/web/b/openemr"/*
63+
ACTION_SH: rsync --recursive --exclude .git <WORK>/git/openemr/* <WORK>/web/b/openemr/
64+
ACTION: rm -fr <WORK>/git/openemr
65+
ACTION: chmod 666 <WORK>/web/b/openemr/sites/default/sqlconf.php
66+
ACTION: chmod -R a+w <WORK>/web/b/openemr/sites/default/documents
67+
ACTION_CAPTURE: cat /home/openemr/github-key
68+
ACTION_CAPTURE: curl -H Authorization:\ token\ \<DRY_RUN_GITHUB_KEY\> https://api.github.com/rate_limit
69+
ACTION_SH: composer install --no-dev &>> <WORK>/web/log/logSetup.txt
70+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
71+
ACTION_SH: npm run build &>> <WORK>/web/log/logSetup.txt
72+
ACTION_SH: npm install --unsafe-perm &>> <WORK>/web/log/logSetup.txt
73+
ACTION_SH: composer global require phing/phing &>> <WORK>/web/log/logSetup.txt
74+
ACTION_SH: /root/.composer/vendor/bin/phing vendor-clean &>> <WORK>/web/log/logSetup.txt
75+
ACTION_SH: /root/.composer/vendor/bin/phing assets-clean &>> <WORK>/web/log/logSetup.txt
76+
ACTION_SH: composer global remove phing/phing &>> <WORK>/web/log/logSetup.txt
77+
ACTION_SH: composer dump-autoload -o &>> <WORK>/web/log/logSetup.txt
78+
ACTION_SH: sed -e 's@^exit;@ @' <<WORK>/web/b/openemr/contrib/util/installScripts/InstallerAuto.php ><WORK>/web/b/openemr/contrib/util/installScripts/InstallerAutoTemp.php
79+
ACTION_SH: su -p -s /bin/sh "root" -c "php -f <WORK>/web/b/openemr/contrib/util/installScripts/InstallerAutoTemp.php rootpass=hey server=mysql loginhost=% login=seven_b pass=seven_b dbname=seven_b" >> <WORK>/web/log/logSetup.txt
80+
ACTION: rm -f <WORK>/web/b/openemr/contrib/util/installScripts/InstallerAutoTemp.php
81+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e UPDATE\ seven_b.globals\ SET\ gl_value=\'https://seven.openemr.io\'\ WHERE\ gl_name=\'site_addr_oath\'
82+
ACTION: mariadb --skip-ssl -h mysql -u root -phey -e $'\n UPDATE seven_b.globals SET gl_value=\'1\' WHERE gl_name=\'portal_onsite_two_enable\';\n UPDATE seven_b.globals SET gl_value=\'1\' WHERE gl_name=\'rest_api\';\n UPDATE seven_b.globals SET gl_value=\'1\' WHERE gl_name=\'rest_fhir_api\';\n UPDATE seven_b.globals SET gl_value=\'1\' WHERE gl_name=\'rest_portal_api\';\n UPDATE seven_b.globals SET gl_value=\'3\' WHERE gl_name=\'oauth_password_grant\';\n UPDATE seven_b.globals SET gl_value=\'1\' WHERE gl_name=\'rest_system_scopes_api\';\n UPDATE seven_b.globals SET gl_value=\'3\' WHERE gl_name=\'ccda_alt_service_enable\';\n '
83+
ACTION: chmod 644 <WORK>/web/b/openemr/sites/default/sqlconf.php
84+
ACTION: mkdir <WORK>/web/b/openemr/sites/default/procedure_results
85+
ACTION: chmod -R a+w <WORK>/web/b/openemr/sites/default/procedure_results
86+
ACTION: sed -i s@/apis/default/@/b/openemr/apis/default/@ <WORK>/web/b/openemr/swagger/openemr-api.yaml
87+
ACTION: sed -i s@/oauth2/default/authorize@/b/openemr/oauth2/default/authorize@ <WORK>/web/b/openemr/swagger/openemr-api.yaml
88+
ACTION: sed -i s@/oauth2/default/token@/b/openemr/oauth2/default/token@ <WORK>/web/b/openemr/swagger/openemr-api.yaml
89+
ACTION: rm -f <WORK>/web/b/openemr/library/openflashchart/php-ofc-library/ofc_upload_image.php
90+
ACTION_SH: stunnel /etc/stunnel/stunnel.conf >> <WORK>/web/log/logSetup.txt
91+
ACTION_SH: postfix start >> <WORK>/web/log/logSetup.txt
92+
ACTION: cp <WORK>/git/demo_farm_openemr/openemr-alpine.conf /etc/apache2/conf.d/openemr.conf
93+
ACTION_SH: httpd -k start >> <WORK>/web/log/logSetup.txt
94+
ACTION: tail -F -n0 /etc/hosts

0 commit comments

Comments
 (0)