try this url https://Jenkins.io/doc/pipeline/tour/tests-and-artifacts/ <https://jenkins.io/doc/pipeline/tour/tests-and-artifacts/>
> On 23 Jan 2020, at 16:12, David Aldrich <[email protected]> wrote: > > > I have a question about declarative script syntax. > > I have a multi-stage job, where each stage runs on a separate agent. Whether > the job passes or fails, I want to archive some artefacts from the job, so I > have to call archiveArtifacts from post::cleanup(). > > stages { > stage(‘S1’) { > agent { label “A” } > steps { > <snip> > } > stage(‘S2’) { > agent { label “B” } > steps { > <snip> > } > } > post { > cleanup{ archiveArtifacts artifacts: '*.zip'} > } > > My problem is that I want to archive the artifacts from a specific agent > (i.e. a specific stage). How would I do that? > > Best regards > David > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej6MzrtnHg-hf5p9SjsrHaNvJEDxkb3os6bdpTrRby4SQ%40mail.gmail.com > > <https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej6MzrtnHg-hf5p9SjsrHaNvJEDxkb3os6bdpTrRby4SQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/29C0FD0C-1B44-4B14-9276-FD42ECAF9240%40dns-direct.com.
