Using CopyArtifact to Copy from a Specific Assembly

I need to copy artifacts from a specific assembly, which is not always the latest. I am looking for a way to copy specfic build artifacts.

Does anyone know if this is possible, and how can I do this?

I use the following snippet in my script pipeline to copy the latest artifacts:

step ([
        $class: 'CopyArtifact',
        projectName: "myproject",
        filter: '_build/*.zip'
    ]);
+4
source share
1 answer

Take a look at the plugin tests ; there is an example of setting a specific selector. If I try to extract it, it will look like this:

step([$class: 'CopyArtifact', 
      projectName: "myproject",
      filter: '_build/*.zip'
      selector: 
            [$class: 'SpecificBuildSelector', 
             buildNumber: "123"]
     ])
+6
source

Source: https://habr.com/ru/post/1653749/


All Articles