From 51ea82b8b00ed18b598ad095c4da1124ddf6bfcb Mon Sep 17 00:00:00 2001 From: Rob Harrison <48765695+robjharrison@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:07:16 +0000 Subject: [PATCH] deployment structure re-configure --- .../{ => live}/azeus_oracle_perm_ssd.sql | 0 .../{ => live}/azeus_sqlserver_ghost_ddl.sql | 0 .../caredirector_db_perm_ssd_placeholder.sql | 0 .../eclipse_db_perm_ssd_placeholder.sql | 0 deployment_extracts/systemc/live/test.sh | 59 +++++++++++++++---- 5 files changed, 48 insertions(+), 11 deletions(-) rename deployment_extracts/azeus/{ => live}/azeus_oracle_perm_ssd.sql (100%) rename deployment_extracts/azeus/{ => live}/azeus_sqlserver_ghost_ddl.sql (100%) rename deployment_extracts/caredirector/{ => live}/caredirector_db_perm_ssd_placeholder.sql (100%) rename deployment_extracts/eclipse/{ => live}/eclipse_db_perm_ssd_placeholder.sql (100%) diff --git a/deployment_extracts/azeus/azeus_oracle_perm_ssd.sql b/deployment_extracts/azeus/live/azeus_oracle_perm_ssd.sql similarity index 100% rename from deployment_extracts/azeus/azeus_oracle_perm_ssd.sql rename to deployment_extracts/azeus/live/azeus_oracle_perm_ssd.sql diff --git a/deployment_extracts/azeus/azeus_sqlserver_ghost_ddl.sql b/deployment_extracts/azeus/live/azeus_sqlserver_ghost_ddl.sql similarity index 100% rename from deployment_extracts/azeus/azeus_sqlserver_ghost_ddl.sql rename to deployment_extracts/azeus/live/azeus_sqlserver_ghost_ddl.sql diff --git a/deployment_extracts/caredirector/caredirector_db_perm_ssd_placeholder.sql b/deployment_extracts/caredirector/live/caredirector_db_perm_ssd_placeholder.sql similarity index 100% rename from deployment_extracts/caredirector/caredirector_db_perm_ssd_placeholder.sql rename to deployment_extracts/caredirector/live/caredirector_db_perm_ssd_placeholder.sql diff --git a/deployment_extracts/eclipse/eclipse_db_perm_ssd_placeholder.sql b/deployment_extracts/eclipse/live/eclipse_db_perm_ssd_placeholder.sql similarity index 100% rename from deployment_extracts/eclipse/eclipse_db_perm_ssd_placeholder.sql rename to deployment_extracts/eclipse/live/eclipse_db_perm_ssd_placeholder.sql diff --git a/deployment_extracts/systemc/live/test.sh b/deployment_extracts/systemc/live/test.sh index 65024686..dd821fb0 100644 --- a/deployment_extracts/systemc/live/test.sh +++ b/deployment_extracts/systemc/live/test.sh @@ -1,10 +1,14 @@ #!/bin/bash # chmod +x test.sh -# This bash file to be run from the downstream repo! +# This bash file to be run from the downstream repo! +# Paths in the upstream repo: # /workspaces/ssd-data-model/deployment_extracts/systemc/live/ # /workspaces/ssd-data-model/deployment_extracts/mosaic/live/ +# /workspaces/ssd-data-model/deployment_extracts/eclipse/live/ +# /workspaces/ssd-data-model/deployment_extracts/caredirector/live/ +# /workspaces/ssd-data-model/deployment_extracts/azeus/live/ # Check if already in the ssd-deployment directory if [ ! -d ".git" ]; then @@ -26,36 +30,69 @@ fi # Enable sparse checkout and pull the specific folders from the source repository git config core.sparseCheckout true -# Add systemc and mosaic paths to sparse-checkout -echo "cms_ssd_extract_sql/systemc/live/" > .git/info/sparse-checkout -echo "cms_ssd_extract_sql/mosaic/live/" >> .git/info/sparse-checkout +# Add paths to sparse-checkout +echo "deployment_extracts/systemc/live/" > .git/info/sparse-checkout +echo "deployment_extracts/mosaic/live/" >> .git/info/sparse-checkout +echo "deployment_extracts/eclipse/live/" >> .git/info/sparse-checkout +echo "deployment_extracts/caredirector/live/" >> .git/info/sparse-checkout +echo "deployment_extracts/azeus/live/" >> .git/info/sparse-checkout # Checkout the systemc directory -if ! git checkout ssd-data-model/main -- cms_ssd_extract_sql/systemc/live/; then +if ! git checkout ssd-data-model/main -- deployment_extracts/systemc/live/; then echo "Error: Failed to checkout the systemc folder. Invalid reference or permissions issue." exit 1 fi # Checkout the mosaic directory -if ! git checkout ssd-data-model/main -- cms_ssd_extract_sql/mosaic/live/; then +if ! git checkout ssd-data-model/main -- deployment_extracts/mosaic/live/; then echo "Error: Failed to checkout the mosaic folder. Invalid reference or permissions issue." exit 1 fi -# Create the systemc and mosaic directories in the downstream repository +# Checkout the eclipse directory +if ! git checkout ssd-data-model/main -- deployment_extracts/eclipse/live/; then + echo "Error: Failed to checkout the eclipse folder. Invalid reference or permissions issue." + exit 1 +fi + +# Checkout the caredirector directory +if ! git checkout ssd-data-model/main -- deployment_extracts/caredirector/live/; then + echo "Error: Failed to checkout the caredirector folder. Invalid reference or permissions issue." + exit 1 +fi + +# Checkout the azeus directory +if ! git checkout ssd-data-model/main -- deployment_extracts/azeus/live/; then + echo "Error: Failed to checkout the azeus folder. Invalid reference or permissions issue." + exit 1 +fi + +# Create the directories in the downstream repository mkdir -p systemc/ mkdir -p mosaic/ +mkdir -p eclipse/ +mkdir -p caredirector/ +mkdir -p azeus/ # Move the systemc folder's contents to the systemc directory -mv cms_ssd_extract_sql/systemc/live/* systemc/ +mv deployment_extracts/systemc/live/* systemc/ # Move the mosaic folder's contents to the mosaic directory -mv cms_ssd_extract_sql/mosaic/live/* mosaic/ +mv deployment_extracts/mosaic/live/* mosaic/ + +# Move the eclipse folder's contents to the eclipse directory +mv deployment_extracts/eclipse/live/* eclipse/ + +# Move the caredirector folder's contents to the caredirector directory +mv deployment_extracts/caredirector/live/* caredirector/ + +# Move the azeus folder's contents to the azeus directory +mv deployment_extracts/azeus/live/* azeus/ # Remove the empty directory structures after the move -rm -rf cms_ssd_extract_sql/ +rm -rf deployment_extracts/ # Stage, commit, and push the changes to the downstream repository git add . -git commit -m "Add live SQL files from systemc and mosaic from ssd-data-model repository" +git commit -m "Add live SQL files from multiple folders in the ssd-data-model repository" git push origin main