common-jobs-bitbucket.sh edited online with Bitbucket

This commit is contained in:
Jay Sharma
2023-10-10 16:12:56 +00:00
parent 833b8a3efb
commit faebb6aad2

View File

@@ -206,11 +206,11 @@ kubectl cp $NAMESPACE/common-job-pod:/tmp/setenv.sh setenv.sh && . ./setenv.sh
# ----------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------
if [[ "$OLD_SUBDOMAIN" = "www" ]] && [[ "$SUBDOMAIN" = "www" ]]; then 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_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 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_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 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' 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'