From faebb6aad22523c536fe4b72b498f68e33d1d084 Mon Sep 17 00:00:00 2001 From: Jay Sharma Date: Tue, 10 Oct 2023 16:12:56 +0000 Subject: [PATCH] common-jobs-bitbucket.sh edited online with Bitbucket --- common-jobs-bitbucket.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common-jobs-bitbucket.sh b/common-jobs-bitbucket.sh index 348042fe..a5a69167 100644 --- a/common-jobs-bitbucket.sh +++ b/common-jobs-bitbucket.sh @@ -206,11 +206,11 @@ kubectl cp $NAMESPACE/common-job-pod:/tmp/setenv.sh setenv.sh && . ./setenv.sh # ----------------------------------------------------------------------------------------- if [[ "$OLD_SUBDOMAIN" = "www" ]] && [[ "$SUBDOMAIN" = "www" ]]; then kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN "$OLD_URL_DOMAIN" "$URL_DOMAIN" --all-tables' -kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN ".$OLD_MAIN_DOMAIN" ".$MAIN_DOMAIN" --all-tables' +[[ "$APP" = "connectamerica" ]] && kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN ".$OLD_MAIN_DOMAIN" ".$MAIN_DOMAIN" --all-tables' elif [[ "$OLD_SUBDOMAIN" = "www" ]] && [[ "$SUBDOMAIN" != "www" ]]; then kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN "$OLD_URL_DOMAIN" "$URL_DOMAIN" --all-tables' -kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN ".$OLD_MAIN_DOMAIN" ".$URL_DOMAIN" --all-tables' +[[ "$APP" = "connectamerica" ]] && kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN ".$OLD_MAIN_DOMAIN" ".$URL_DOMAIN" --all-tables' elif [[ "$OLD_SUBDOMAIN" != "www" ]] && [[ "$SUBDOMAIN" = "www" ]]; then kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'cat /tmp/setenv.sh ; . /tmp/setenv.sh; wp search-replace --allow-root --path=/usr/share/nginx/subdomain/$SUBDOMAIN ".$OLD_URL_DOMAIN" ".$MAIN_DOMAIN" --all-tables'