Skip to content
Snippets Groups Projects
Commit 2327e91b authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch '51/data-handling-fix' into 'main'

#51 missed fixing it for the CopyDataToStage task

See merge request !2
parents 1256ebc2 5dff0b54
No related branches found
No related tags found
1 merge request!2#51 missed fixing it for the CopyDataToStage task
......@@ -137,11 +137,11 @@ CopyDataToStage:
- if [[ ! -d /data/${targetbranch}/app ]]; then echo "Target branch does not exist!"; exit 2; fi
- if [[ "${targetbranch}" == "main" ]]; then echo "Main branch is not an allowed target!"; exit 3; fi
- cd /data/${sourcebranch}/app
- SANITIZED_SOURCE_BRANCH_NAME=$(echo ${sourcebranch} | sed -r 's/[/_]+/-/g')
- SANITIZED_SOURCE_BRANCH_NAME=$(echo ${sourcebranch} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_SOURCE_BRANCH_NAME} exec php drush sql:dump --result-file=/var/backups/mysql/drupal.sql
- rsync -rlDzogtp /data/${sourcebranch}/files/ /data/${targetbranch}/files/
- cd /data/${targetbranch}/app
- SANITIZED_TARGET_BRANCH_NAME=$(echo ${targetbranch} | sed -r 's/[/_]+/-/g')
- SANITIZED_TARGET_BRANCH_NAME=$(echo ${targetbranch} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_TARGET_BRANCH_NAME} cp /data/${targetbranch}/files/db/drupal.sql php:/tmp
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_TARGET_BRANCH_NAME} exec php drush -y sql:drop
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_TARGET_BRANCH_NAME} exec php drush -y sql:query --file=/tmp/drupal.sql
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment