Gist to support https://www.youtube.com/watch?v=u6LF-T-daS4
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
durabilityHint('PERFORMANCE_OPTIMIZED')
disableConcurrentBuilds()
}
stages{
stage('build') {
steps {
sh 'echo "Hello World" > hello.txt'
}
}
stage('archive') {
steps {
archiveArtifacts(artifacts: '**/*.txt', followSymlinks: false)
}
}
}
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::dpope-jenkins-archiveartifacts"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::dpope-jenkins-archiveartifacts/*"
}
]
}