I am trying to add a step in jenkins to download from s3
//download file from s3
withAWS(credentials:'credss') {
s3Download(file:'test.json', bucket:'test', path:'/devops/test.json',force:true)
}
I am getting this below error
java.lang.NoSuchMethodError: No such DSL method 'withAWS' found among steps
make sure the pipeline: AWS Steps plugin is installed. Add your user AWS credentials to the Jenkins. Make sure the user has the permissions to download the file from S3. Please refer Pipeline: AWS Steps Github for additional syntax's how to integrate AWS services with jenkins pipeline.
pipeline {
agent any
stages {
stage('S3download') {
steps {
withAWS(credentials:'awscredentials') {
s3Download(file: 'key', bucket: 'test', path: '/home/ubuntu/')
}
}
}
}
}
pipeline {
agent any
stages {
stage('download') {
steps {
withAWS(credentials:'XXXX',region:'XXXXXX') {
s3Download bucket:'bucketname',file:'toPath', path:'fromPath',force:true
}
}
}
stage('Done') {
steps {
echo "done"
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With