Silent rclone
This commit is contained in:
@@ -103,7 +103,7 @@ git add --all && git commit -m "auto-patch $VERSION-$ENV-$SUBDOMAIN-$(date +%Y-
|
||||
|
||||
kubectl delete po common-job-pod -n $NAMESPACE
|
||||
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
|
||||
;;
|
||||
|
||||
@@ -118,12 +118,12 @@ kubectl exec common-job-pod -n $NAMESPACE -- sh -c 'chmod 755 /tmp/setenv.sh'
|
||||
# --------------------------------------------------------------------------------------------
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- apt update
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- apt install rclone rsync -y
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; cd /tmp && rclone sync --stats-one-line-date --size-only --fast-list --exclude wp-content/uploads/** wp/ /usr/share/nginx/subdomain/$SUBDOMAIN && echo ---sync-done--- '
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; cd /tmp && rclone sync --size-only --fast-list --exclude wp-content/uploads/** wp/ /usr/share/nginx/subdomain/$SUBDOMAIN && echo ---sync-done--- '
|
||||
|
||||
echo $SUBDOMAIN | grep www && echo "maindomain $URL_DOMAIN" || kubectl delete po common-job-pod -n $NAMESPACE
|
||||
# -------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
|
||||
;;
|
||||
|
||||
@@ -151,7 +151,7 @@ curl --request POST -F files=@"$FILE" --url "https://api.bitbucket.org/2.0/repo
|
||||
|
||||
kubectl delete po common-job-pod -n $NAMESPACE
|
||||
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
|
||||
;;
|
||||
|
||||
@@ -168,7 +168,7 @@ kubectl cp $NAMESPACE/common-job-pod:/tmp/upload.zip $NAMESPACE-$VERSION-$ENV-$S
|
||||
FILE=`ls $NAMESPACE-*.zip`
|
||||
aws s3 cp $FILE s3://commonjobs/$NAMESPACE/$opt/
|
||||
kubectl delete po common-job-pod -n $NAMESPACE
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
;;
|
||||
|
||||
mysql-restore)
|
||||
@@ -235,7 +235,7 @@ fi
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; wp search-replace --allow-root --path=/tmp/wp "http://$NEW_URL" "https://$NEW_URL" --all-tables'
|
||||
|
||||
kubectl delete po common-job-pod -n $NAMESPACE
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
;;
|
||||
|
||||
|
||||
@@ -256,10 +256,10 @@ kubectl cp $FILE $NAMESPACE/common-job-pod:/tmp/$FILE
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; mkdir -p /usr/share/nginx/subdomain/$SUBDOMAIN/wp-content/uploads'
|
||||
# ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; mkdir /tmp/uploads ;export FILE=`ls /tmp/*.zip`;unzip -o $FILE -d /tmp/uploads'
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; rclone sync --stats-one-line-date --size-only --fast-list /tmp/uploads/ /usr/share/nginx/subdomain/$SUBDOMAIN/wp-content/uploads && echo ---sync-done--- '
|
||||
kubectl exec common-job-pod -n $NAMESPACE -- sh -c '. /tmp/setenv.sh; rclone sync --size-only --fast-list /tmp/uploads/ /usr/share/nginx/subdomain/$SUBDOMAIN/wp-content/uploads && echo ---sync-done--- '
|
||||
# --------------------------------------------------------------------------------------
|
||||
kubectl delete po common-job-pod -n $NAMESPACE
|
||||
cat script.log | egrep -v "*|Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
cat script.log | egrep -v "Errors:|SQL|rewrite|Rewrite|warning|Warning|create mode" | egrep -i "not in gzip format|fail|fatal|exception|terminated|command not found|error|unexpected|cannot access|No such file" && exit 9 || echo VALIDATION_PASS_$opt
|
||||
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user