0

I have tried to use the Copy Artifact Plugin in a Jenkinsfile as this:

copyArtifacts(projectName: 'myProject', selector: lastSuccessful(), filter: '*.png*', target: 'Figures');

The code is working but I also need to the the permission of 'myProject' to use the plugin. Via Jenkins it's a tic-box like this:

enter image description here

I can only check the ticbox if I don't use a Jenkins file in the Jenkins job.

Question: How can I set the permission in the jenkins file directly instead of using the ticbox?

Sharky
  • 323
  • 1
  • 3
  • 11

1 Answers1

1

Declarative pipeline:

pipeline {
    agent any;
    options {
        copyArtifactPermission('job1,job2,...');
    }
    stages{...}
}
rodee
  • 3,233
  • 5
  • 34
  • 70