Skip to content
Snippets Groups Projects
Commit 1256ebc2 authored by jurgenhaas's avatar jurgenhaas
Browse files

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

#51 make sure SANITIZED_BRANCH_NAME is always lowercase

See merge request !1
parents 9156657e 59a45cfd
No related branches found
No related tags found
1 merge request!1#51 make sure SANITIZED_BRANCH_NAME is always lowercase
......@@ -61,7 +61,7 @@ CollectConfig:
- branch=${CHAT_INPUT}${TRIGGER_INPUT}
- if [[ ! -d /data/${branch} ]]; then echo "Branch $branch does not exist"; exit 1; fi
- cd /data/${branch}/app
- SANITIZED_BRANCH_NAME=$(echo ${branch} | sed -r 's/[/_]+/-/g')
- SANITIZED_BRANCH_NAME=$(echo ${branch} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush sql:dump --result-file=/var/backups/mysql/drupal.sql
- cd -
- cp /data/${branch}/files/db/drupal.sql .
......@@ -166,7 +166,7 @@ ResetLocales:
- echo "Branch ${branch}"
- if [[ ! -d /data/${branch}/app ]]; then branch=${CI_COMMIT_REF_NAME}; fi
- cd /data/${branch}/app
- SANITIZED_BRANCH_NAME=$(echo ${branch} | sed -r 's/[/_]+/-/g')
- SANITIZED_BRANCH_NAME=$(echo ${branch} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush -y sql:query "truncate locales_location;"
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush -y sql:query "truncate locales_source;"
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush -y sql:query "truncate locales_target;"
......@@ -198,7 +198,7 @@ ResetLocalesCustom:
- IFS=' ' read branch <<< ${CHAT_INPUT}
- if [[ ! -d /data/${branch}/app ]]; then branch=${CI_COMMIT_REF_NAME}; fi
- cd /data/${branch}/app
- SANITIZED_BRANCH_NAME=$(echo ${branch} | sed -r 's/[/_]+/-/g')
- SANITIZED_BRANCH_NAME=$(echo ${branch} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush -y locale:import ${LANG} ${FILE} --type=custom --override=all
DeployAssetsToDrupal:
......@@ -223,7 +223,7 @@ DeployAssetsToDrupal:
- cd /data/${CI_COMMIT_REF_NAME}/app
- rm -rf vendor/${ASSET_PATH}
- git clone -b ${ASSET_BRANCH} ${ASSET_REPO} vendor/${ASSET_PATH}
- SANITIZED_BRANCH_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -r 's/[/_]+/-/g')
- SANITIZED_BRANCH_NAME=$(echo ${CI_COMMIT_REF_NAME} | tr [:upper:] [:lower:] | sed -r 's/[/_]+/-/g')
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush migrate:import --all --skip-progress-bar
- docker compose --project-name ${PROJECT_NAME}_${SANITIZED_BRANCH_NAME} exec php drush migrate:import --all --skip-progress-bar
......
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