From aa76ecd86315eec1d63892c1e53cb8bd70dcc139 Mon Sep 17 00:00:00 2001 From: Warren Christian <70002196+warrenchristian1telus@users.noreply.github.com> Date: Fri, 29 Dec 2023 13:11:44 -0800 Subject: [PATCH] Adjust migrate build script Removed default CMD to run migrate job in Dockerfile Fixed configMap createion with specified/modified file name --- Moodle.Dockerfile | 2 +- openshift/migrate-build-files-job.yml | 4 ++-- openshift/scripts/deploy-template.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Moodle.Dockerfile b/Moodle.Dockerfile index 93e473a..bbd86e9 100644 --- a/Moodle.Dockerfile +++ b/Moodle.Dockerfile @@ -90,4 +90,4 @@ COPY ./config/moodle/moodle_index_during_maintenance.php /tmp/moodle_index_durin COPY ./openshift/scripts/migrate-build-files.sh /usr/local/bin/migrate-build-files.sh COPY ./openshift/scripts/test-migration-complete.sh /usr/local/bin/test-migration-complete.sh -CMD ["/bin/bash", "/usr/local/bin/migrate-build-files.sh"] +# CMD ["/bin/bash", "/usr/local/bin/migrate-build-files.sh"] diff --git a/openshift/migrate-build-files-job.yml b/openshift/migrate-build-files-job.yml index 86789a7..94976fc 100644 --- a/openshift/migrate-build-files-job.yml +++ b/openshift/migrate-build-files-job.yml @@ -50,8 +50,8 @@ objects: - bash - "-c" - | - echo "Migrating build fiiles to persistent volume" - cp -ru /app/public/* /var/www/html + echo "Migrating build files from /app/public to /var/www/html..." + sh /usr/local/bin/migrate-build-files.sh imagePullPolicy: Always restartPolicy: Never parameters: diff --git a/openshift/scripts/deploy-template.sh b/openshift/scripts/deploy-template.sh index 0614934..b345652 100644 --- a/openshift/scripts/deploy-template.sh +++ b/openshift/scripts/deploy-template.sh @@ -4,8 +4,8 @@ echo "Current namespace is $DEPLOY_NAMESPACE" # Create ConfigMaps oc create configmap $WEB_DEPLOYMENT_NAME-config --from-file=./config/nginx/default.conf -oc create configmap $APP-config --from-file=./config/moodle/$MOODLE_ENVIRONMENT.config.php -oc create configmap $CRON_DEPLOYMENT_NAME-config --from-file=./config/cron/$MOODLE_ENVIRONMENT.config.php +oc create configmap $APP-config --from-file=config.php=./config/moodle/$MOODLE_ENVIRONMENT.config.php +oc create configmap $CRON_DEPLOYMENT_NAME-config --from-file=config.php=./config/cron/$MOODLE_ENVIRONMENT.config.php oc -n $DEPLOY_NAMESPACE process -f ./openshift/template.json \ -p APP_NAME=$APP \