Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic update #678

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .platform/schema
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15
16
160 changes: 88 additions & 72 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ hidden:
neighbourhoods_uuid: true
node_url: true
published_at: true
search_api_excerpt: true
short_title: true
tags: true
tags_uuid: true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ hidden:
neighbourhoods_uuid: true
node_url: true
published_at: true
search_api_excerpt: true
short_title: true
tags: true
tags_uuid: true
14 changes: 6 additions & 8 deletions docker/openshift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ COPY / /var/www/html/
WORKDIR /var/www/html
RUN composer install --no-progress --profile --prefer-dist --no-interaction --no-dev --optimize-autoloader

# Copy ALL deploy scripts
# Copy custom entrypoints.
# @see https://github.com/City-of-Helsinki/drupal-docker-images/tree/main/openshift/drupal
RUN mkdir -p /crons /entrypoints /deploy
COPY docker/openshift/entrypoints/ /entrypoints
RUN chmod +x /entrypoints/*
COPY docker/openshift/crons/ /crons
COPY docker/openshift/deploy /deploy
RUN chmod +x /entrypoints/* /deploy/* /crons/*

COPY docker/openshift/init.sh /

# Copy cron scripts
RUN mkdir /crons
COPY docker/openshift/crons/ /crons
COPY docker/openshift/cron-entrypoint.sh /usr/local/bin/cron-entrypoint
RUN chmod +x /crons/* /usr/local/bin/cron-entrypoint

# Copy nginx overrides.
COPY docker/openshift/custom.locations /etc/nginx/conf.d/custom.locations
42 changes: 0 additions & 42 deletions docker/openshift/cron-entrypoint.sh

This file was deleted.

11 changes: 11 additions & 0 deletions docker/openshift/deploy/10-preflight.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

source /init.sh

if [ -f "../docker/openshift/preflight/preflight.php" ]; then
echo "Running preflight checks ..."
if ! php ../docker/openshift/preflight/preflight.php; then
exit 1
fi
fi

27 changes: 27 additions & 0 deletions docker/openshift/deploy/20-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# 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

echo "Starting deploy: $(date)"

# Populate deploy ID so 20-deploy.sh is skipped.
# @todo Remove this once 20-deploy.sh is removed.
set_deploy_id $OPENSHIFT_BUILD_NAME

drush state:set system.maintenance_mode 1 --input-format=integer
# Run pre-deploy tasks.
# @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
# Run post-deploy tasks.
# @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/blob/main/documentation/deploy-hooks.md
drush helfi:post-deploy || true
# Disable maintenance mode
drush state:set system.maintenance_mode 0 --input-format=integer
6 changes: 6 additions & 0 deletions docker/openshift/entrypoints/15-twig-compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# Populate twig caches.
if [ ! -d "/tmp/twig" ]; then
drush twig:compile || true
fi
1 change: 1 addition & 0 deletions docker/openshift/entrypoints/20-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# NOTE: This script is being phased out in favor of new deployment job pod.

# Skip deployment script if ENV var is true
if [ "$SKIP_DEPLOY_SCRIPTS" = "true" ]; then
Expand Down