command terminated with exit code 1 when executing aws s3 cp in Jenkins Declarative Pipeline

4/30/2019

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

-- may
amazon-s3
amazon-web-services
jenkins
kubectl
kubernetes

0 Answers