I'm trying to upload my files to AWS S3 Bucket from my Kubernetes Pod thru Jenkins and got command terminated with exit code 1. Succeeding commands are terminated.
I've tried to manually run my command on the pod, and it works perfectly fine.
Here's my code on jenkins declarative pipeline:
sh (script: "kubectl exec -i ${MONGODB_POD_NAME} -n ${ENVIRONMENT} -- bash -c 'aws s3 sync /dump/${AUTOMATION_DUMP_DIRECTORY} s3://${S3_BUCKET}/${ENVIRONMENT}/${AUTOMATION_DUMP_DIRECTORY} --debug'")
Here's the log:
2019-04-29 09:55:23,373 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread,shutting down result thread.command terminated with exit code 1