remove comments, add hard link function
This commit is contained in:
parent
e756e71203
commit
1fa63f6967
Binary file not shown.
@ -114,6 +114,11 @@ function rsync_delete_prod() {
|
|||||||
sudo -l && rsync -vrlptDSH --chown=10004:10005 --progress --human-readable --delete "${REV}/" "${TARGET}"
|
sudo -l && rsync -vrlptDSH --chown=10004:10005 --progress --human-readable --delete "${REV}/" "${TARGET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function perform_hardlink() {
|
||||||
|
TARGET="${1}"
|
||||||
|
hardlink -x '.*\.xml.*' "${TARGET}"
|
||||||
|
}
|
||||||
|
|
||||||
export -f parallel_rsync_no_delete_staging
|
export -f parallel_rsync_no_delete_staging
|
||||||
export -f parallel_rsync_no_delete_prod
|
export -f parallel_rsync_no_delete_prod
|
||||||
export -f parallel_rsync_delete_staging
|
export -f parallel_rsync_delete_staging
|
||||||
@ -122,3 +127,4 @@ export -f rsync_no_delete_staging
|
|||||||
export -f rsync_no_delete_prod
|
export -f rsync_no_delete_prod
|
||||||
export -f rsync_delete_staging
|
export -f rsync_delete_staging
|
||||||
export -f rsync_delete_prod
|
export -f rsync_delete_prod
|
||||||
|
export -f perform_hardlink
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
case "${RLREL}" in
|
case "${RLREL}" in
|
||||||
stable)
|
stable)
|
||||||
REVISION=9.2
|
REVISION=9.2
|
||||||
APPEND_TO_DIR="-RC4"
|
APPEND_TO_DIR="-RC1"
|
||||||
;;
|
;;
|
||||||
beta)
|
beta)
|
||||||
REVISION=9.3
|
REVISION=9.3
|
||||||
|
@ -17,30 +17,7 @@ ret_val=$?
|
|||||||
if [ $ret_val -eq "0" ]; then
|
if [ $ret_val -eq "0" ]; then
|
||||||
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV:0:3}"
|
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV:0:3}"
|
||||||
mkdir -p "${TARGET}"
|
mkdir -p "${TARGET}"
|
||||||
# disabling because none of our files should be starting with dashes. If they
|
rsync_delete_prod "${REV}" "${TARGET}"
|
||||||
# are something is *seriously* wrong here.
|
|
||||||
# shellcheck disable=SC2035
|
|
||||||
sudo -l && find ./ -mindepth 1 -maxdepth 1 -type d -exec find {}/ -mindepth 1 -maxdepth 1 -type d \;|sed 's/^..//g' | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable --delete \
|
|
||||||
{} "${TARGET}"
|
|
||||||
# shellcheck disable=SC2035
|
|
||||||
sudo -l && find ** -maxdepth 0 -type l | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
||||||
{} "${TARGET}"
|
|
||||||
|
|
||||||
# Temporary until empanadas has this support
|
|
||||||
if [ -f "COMPOSE_ID" ]; then
|
|
||||||
cp COMPOSE_ID "${TARGET}"
|
|
||||||
chown 10004:10005 "${TARGET}/COMPOSE_ID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "metadata" ]; then
|
|
||||||
rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Full file list update for production root
|
|
||||||
cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; }
|
|
||||||
## Hardlink everything except xml files
|
|
||||||
echo "Hard linking"
|
|
||||||
hardlink -x '.*\.xml.*' "${REVISION}"
|
|
||||||
echo "Syncing to prod completed. Please run the file list script."
|
echo "Syncing to prod completed. Please run the file list script."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,49 +17,7 @@ ret_val=$?
|
|||||||
if [ $ret_val -eq "0" ]; then
|
if [ $ret_val -eq "0" ]; then
|
||||||
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV:0:3}"
|
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV:0:3}"
|
||||||
mkdir -p "${TARGET}"
|
mkdir -p "${TARGET}"
|
||||||
# disabling because none of our files should be starting with dashes. If they
|
rsync_no_delete_prod "${REV}" "${TARGET}"
|
||||||
# are something is *seriously* wrong here.
|
|
||||||
# shellcheck disable=SC2035
|
|
||||||
sudo -l && find ./ -mindepth 1 -maxdepth 1 -type d -exec find {}/ -mindepth 1 -maxdepth 1 -type d \;|sed 's/^..//g' | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
||||||
{} "${TARGET}"
|
|
||||||
# shellcheck disable=SC2035
|
|
||||||
sudo -l && find ** -maxdepth 0 -type l | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
||||||
{} "${TARGET}"
|
|
||||||
|
|
||||||
# Temporary until empanadas has this support
|
|
||||||
if [ -f "COMPOSE_ID" ]; then
|
|
||||||
cp COMPOSE_ID "${TARGET}"
|
|
||||||
chown 10004:10005 "${TARGET}/COMPOSE_ID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "metadata" ]; then
|
|
||||||
rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Full file list update for production root
|
|
||||||
#cd "${PRODUCTION_ROOT}/" || echo { echo "Failed to change directory"; exit 1; }
|
|
||||||
#find . > fullfilelist
|
|
||||||
#if [[ -f /usr/local/bin/create-filelist ]]; then
|
|
||||||
# # We're already here, but Justin Case wanted this
|
|
||||||
# cd "${PRODUCTION_ROOT}/" || { echo "Failed to change directory"; exit 1; }
|
|
||||||
# /bin/cp fullfiletimelist-rocky fullfiletimelist-rocky-old
|
|
||||||
# /usr/local/bin/create-filelist > fullfiletimelist-rocky
|
|
||||||
# cp fullfiletimelist-rocky fullfiletimelist
|
|
||||||
#fi
|
|
||||||
## Full file list update for rocky linux itself
|
|
||||||
cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; }
|
|
||||||
## Hardlink everything except xml files
|
|
||||||
echo "Hard linking"
|
|
||||||
hardlink -x '.*\.xml.*' "${REVISION}"
|
|
||||||
#find . > fullfilelist
|
|
||||||
#if [[ -f /usr/local/bin/create-filelist ]]; then
|
|
||||||
# # We're already here, but Justin Case wanted this
|
|
||||||
# cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; }
|
|
||||||
# /bin/cp fullfiletimelist-rocky fullfiletimelist-rocky-old
|
|
||||||
# /usr/local/bin/create-filelist > fullfiletimelist-rocky
|
|
||||||
# cp fullfiletimelist-rocky fullfiletimelist
|
|
||||||
#fi
|
|
||||||
#chown 10004:10005 fullfilelist fullfiletimelist-rocky fullfiletimelist
|
|
||||||
echo "Syncing to prod completed. Please run the file list script."
|
echo "Syncing to prod completed. Please run the file list script."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -22,19 +22,7 @@ ret_val=$?
|
|||||||
if [ $ret_val -eq "0" ]; then
|
if [ $ret_val -eq "0" ]; then
|
||||||
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
|
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
|
||||||
mkdir -p "${TARGET}"
|
mkdir -p "${TARGET}"
|
||||||
# disabling because none of our files should be starting with dashes. If they
|
echo "Hardlinking compose directory before syncing"
|
||||||
# are something is *seriously* wrong here.
|
perform_hardlink "compose"
|
||||||
#sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable --delete \
|
|
||||||
# {} "${TARGET}"
|
|
||||||
|
|
||||||
# This is temporary until we implement rsync into empanadas
|
|
||||||
#if [ -f "COMPOSE_ID" ]; then
|
|
||||||
# cp COMPOSE_ID "${TARGET}"
|
|
||||||
# chown 10004:10005 "${TARGET}/COMPOSE_ID"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#if [ -d "metadata" ]; then
|
|
||||||
# rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}"
|
|
||||||
#fi
|
|
||||||
rsync_delete_staging "${TARGET}"
|
rsync_delete_staging "${TARGET}"
|
||||||
fi
|
fi
|
||||||
|
@ -23,20 +23,6 @@ if [ $ret_val -eq "0" ]; then
|
|||||||
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
|
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
|
||||||
mkdir -p "${TARGET}"
|
mkdir -p "${TARGET}"
|
||||||
rsync_no_delete_staging "${TARGET}"
|
rsync_no_delete_staging "${TARGET}"
|
||||||
# disabling because none of our files should be starting with dashes. If they
|
echo "Hardlinking staging directory"
|
||||||
# are something is *seriously* wrong here.
|
perform_hardlink "${TARGET}"
|
||||||
#sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
||||||
# {} "${TARGET}"
|
|
||||||
|
|
||||||
# This is temporary until we implement rsync into empanadas
|
|
||||||
#if [[ "${COMPOSE}" == "Rocky" ]]; then
|
|
||||||
# if [ -f "COMPOSE_ID" ]; then
|
|
||||||
# cp COMPOSE_ID "${TARGET}"
|
|
||||||
# chown 10004:10005 "${TARGET}/COMPOSE_ID"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# if [ -d "metadata" ]; then
|
|
||||||
# rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}"
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user