Skip to content

Commit

Permalink
Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hel-platta-automation authored and github-actions[bot] committed May 20, 2024
1 parent 750a603 commit 34de314
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 36 deletions.
66 changes: 33 additions & 33 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions docker/openshift/entrypoints/20-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# Skip deployment script if ENV var is true
if [ "$SKIP_DEPLOY_SCRIPTS" = "true" ]; then
echo "SKIP_DEPLOY_SCRIPTS is true. Skipping the steps."
return
fi

source /init.sh

function rollback_deployment {
Expand Down Expand Up @@ -36,10 +42,9 @@ if [ "$CURRENT_DEPLOY_ID" != "$OPENSHIFT_BUILD_NAME" ]; then
# @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/blob/main/documentation/deploy-hooks.md
drush helfi:pre-deploy || true
# Run maintenance tasks (config import, database updates etc)
drush deploy

OUTPUT=$(sh -c '(drush deploy); exit $?' 2>&1)
if [ $? -ne 0 ]; then
rollback_deployment "drush deploy failed with {$?} exit code. See logs for more information." $CURRENT_DEPLOY_ID
rollback_deployment "drush deploy failed with {$?} exit code. ${OUTPUT}" $CURRENT_DEPLOY_ID
exit 1
fi
# Run post-deploy tasks.
Expand Down

0 comments on commit 34de314

Please sign in to comment.