Skip to content

Commit

Permalink
minor tweaks to script files
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed May 27, 2024
1 parent 396639b commit b418017
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
19 changes: 9 additions & 10 deletions dockerbuild/run-idp.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#!/usr/bin/env bash

# Try to run database migrations
cd /data/vendor/simplesamlphp/simplesamlphp/modules/silauth
chmod a+x ./lib/Auth/Source/yii
# echo script commands to stdout
set -x

# exit if any command fails
set -e

output=$(./lib/Auth/Source/yii migrate --interactive=0 2>&1)
# Try to run database migrations
cd /data/vendor/simplesamlphp/simplesamlphp/modules/silauth/lib/Auth/Source
chmod a+x ./yii

# If they failed, exit.
rc=$?;
if [[ $rc != 0 ]]; then
logger --priority user.err --stderr "Migrations failed with status ${rc} and output: ${output}"
exit $rc;
fi
./yii migrate --interactive=0

cd /data
./run.sh
5 changes: 4 additions & 1 deletion dockerbuild/run-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash

set -e
# echo script commands to stdout
set -x

# exit if any command fails
set -e

cd /data
export COMPOSER_ALLOW_SUPERUSER=1; composer install

Expand Down
5 changes: 4 additions & 1 deletion dockerbuild/run-metadata-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash

set -e
# echo script commands to stdout
set -x

# exit if any command fails
set -e

cd /data
export COMPOSER_ALLOW_SUPERUSER=1; composer install

Expand Down
5 changes: 4 additions & 1 deletion dockerbuild/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash

set -e
# echo script commands to stdout
set -x

# exit if any command fails
set -e

/data/run-metadata-tests.sh

./vendor/bin/phpunit -v tests/AnnouncementTest.php
Expand Down
6 changes: 6 additions & 0 deletions dockerbuild/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

# echo script commands to stdout
set -x

# exit if any command fails
set -e

# This is a temporary fix (bug workaround) until ssp 2.0 is in use
sed -i 's_\(\\SimpleSAML\\Error\\Assertion::installHandler()\)_// \1 _' /data/vendor/simplesamlphp/simplesamlphp/www/_include.php

Expand Down

0 comments on commit b418017

Please sign in to comment.