minio / minio-jenkins

This is a simple Jenkins plugin that lets you upload Jenkins artifacts to a Minio Server
Apache License 2.0
5 stars 10 forks source link

Support Jenkins Pipelines #13

Open steffen-wilke opened 5 years ago

steffen-wilke commented 5 years ago

Since #8 is closed, I'd like to create this new issue on the topic of proper Jenkins Pipeline support.

Use-Case: We build our software with Jenkins Declarative Pipelines. The artifacts that are produced in the post build step are only persistent as long as the build is kept. This is where minio comes into play. We want to store build artifacts in a minio bucket.

Workaround:

8 Already mentioned a syntax to achieve this:

Jenkinsfile:
...
post {
  success {
    step([$class: 'MinioUploader',
                         sourceFile: '*.zip',
                         bucketName: 'artifacts']) 
  }
}

Expected:

Jenkinsfile:
...
post {
  success {
    minioUpload(sourceFiles: "*.zip", bucketName: "artifacts")
  }
}

Also, it would be great to have the possibility to specify the host, accessKey and secretKey on a pipeline level (as additional parameters), so the configuration is not just a global Jenkins thing which effectively allows one Jenkins instance to only talk to one minio server.

eplodn commented 5 years ago

Could be done e.g. as

withMinio(endpointUrl:'http://minio.local', credentials:'12345678-abcd-1111-2222') {
   // minioUpload()
}

This would allow for many minio servers.

kannappanr commented 5 years ago

@steffen-wilke Can you please try as suggested by @eplodn

steffen-wilke commented 5 years ago

@kannappanr If I understood it correctly, the suggestion is no solution for my request. It's a suggestion for how the additional configuration options for host, accessKey and secretKey could be realized.

kannappanr commented 5 years ago

@steffen-wilke Sorry, I didn't read through the entire message. Will check internally within the team and see how we can support this.

svenstaro commented 5 years ago

@kannappanr did you come to any conclusion?

harshavardhana commented 5 years ago

Currently we don't have much cycles to address this issue, we will come back to it in future.