add rsync that does not sync repodata
This commit is contained in:
parent
6cfae3af98
commit
48be209c64
@ -159,6 +159,12 @@ function rsync_no_delete_prod() {
|
|||||||
sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable "${REV}/" "${TARGET}"
|
sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable "${REV}/" "${TARGET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rsync_no_delete_prod_no_repodata() {
|
||||||
|
local REV="${1}"
|
||||||
|
local TARGET="${2}"
|
||||||
|
sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --exclude repodata "${REV}/" "${TARGET}"
|
||||||
|
}
|
||||||
|
|
||||||
function rsync_delete_staging() {
|
function rsync_delete_staging() {
|
||||||
local TARGET="${1}"
|
local TARGET="${1}"
|
||||||
sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete compose/ "${TARGET}"
|
sudo -l && rsync -vrlptDSHog --chown=10004:10005 --progress --human-readable --delete compose/ "${TARGET}"
|
||||||
@ -303,6 +309,7 @@ export -f parallel_rsync_delete_prod
|
|||||||
export -f rsync_no_delete_staging
|
export -f rsync_no_delete_staging
|
||||||
export -f rsync_no_delete_staging_with_excludes
|
export -f rsync_no_delete_staging_with_excludes
|
||||||
export -f rsync_no_delete_prod
|
export -f rsync_no_delete_prod
|
||||||
|
export -f rsync_no_delete_prod_no_repodata
|
||||||
export -f rsync_delete_staging
|
export -f rsync_delete_staging
|
||||||
export -f rsync_delete_staging_with_excludes
|
export -f rsync_delete_staging_with_excludes
|
||||||
export -f rsync_delete_prod
|
export -f rsync_delete_prod
|
||||||
|
23
sync/sync-to-vault.sh
Normal file
23
sync/sync-to-vault.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Syncs everything from staging to production
|
||||||
|
|
||||||
|
if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source common variables
|
||||||
|
# shellcheck disable=SC2046,1091,1090
|
||||||
|
source "$(dirname "$0")/common"
|
||||||
|
|
||||||
|
REV=${REVISION}${APPEND_TO_DIR}
|
||||||
|
|
||||||
|
cd "${STAGING_ROOT}/${CATEGORY_STUB}" || { echo "Failed to change directory"; ret_val=1; exit 1; }
|
||||||
|
ret_val=$?
|
||||||
|
|
||||||
|
if [ $ret_val -eq "0" ]; then
|
||||||
|
TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV/-*/}"
|
||||||
|
mkdir -p "${TARGET}"
|
||||||
|
rsync_delete_prod "${REV}" "${TARGET}"
|
||||||
|
echo "Syncing to prod completed. Please run the file list script."
|
||||||
|
fi
|
||||||
|
|
24
sync/vault-release-no-repodata.sh
Normal file
24
sync/vault-release-no-repodata.sh
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Syncs everything from production to vault
|
||||||
|
|
||||||
|
if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then
|
||||||
|
echo "Lookahead nor Beta should be vaulted"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source common variables
|
||||||
|
# shellcheck disable=SC2046,1091,1090
|
||||||
|
source "$(dirname "$0")/common"
|
||||||
|
|
||||||
|
REV=${REVISION}
|
||||||
|
|
||||||
|
cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}" || { echo "Failed to change directory"; ret_val=1; exit 1; }
|
||||||
|
ret_val=$?
|
||||||
|
|
||||||
|
if [ $ret_val -eq "0" ]; then
|
||||||
|
TARGET="${PRODUCTION_ROOT}/${VAULT_STUB}/${REV}"
|
||||||
|
mkdir -p "${TARGET}"
|
||||||
|
rsync_no_delete_prod_no_repodata "${REV}" "${TARGET}"
|
||||||
|
echo "Syncing to the vault completed. Please run the file list script."
|
||||||
|
fi
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Syncs everything from staging to production
|
# Syncs everything from production to vault
|
||||||
|
|
||||||
if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then
|
if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then
|
||||||
echo "Lookahead nor Beta should be vaulted"
|
echo "Lookahead nor Beta should be vaulted"
|
||||||
|
Loading…
Reference in New Issue
Block a user