Trying to use CopyArtifact in declarative pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to use CopyArtifact in declarative pipeline

dandeliondodgeball
Original post: https://groups.google.com/forum/#!topic/jenkinsci-users/n1oqnnW1A98

So this worked (scripted)

node {
step ([$class: 'CopyArtifact', projectName: 'Create_Infrastructure_archive']);


This doesn't break, but nothing happens (declarative).  

pipeline {
agent any
stages {
stage('Build') {
steps {
script {
[$class: 'CopyArtifact', projectName: 'Create_Infrastructure_archive']
}

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3ad1872f-7e22-478a-b807-74e16c58378d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use CopyArtifact in declarative pipeline

dandeliondodgeball
Ok, finally got it.  This worked.

script {
step ([$class: 'CopyArtifact', projectName: 'Create_Infrastructure_archive']);
}

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/01208ee3-91b2-4520-84cb-54a9823a56ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use CopyArtifact in declarative pipeline

dandeliondodgeball
Took me a while to find this, so posting it to make it easier to find.

CopyArtifact syntax (ok, maybe syntax isn't the correct word for this, but you get the idea)

  step ([$class: 'CopyArtifact',

    projectName: "${jobname}",

    filter: "dist/${platform}/${targets}",

    selector: [ $class: 'SpecificBuildSelector', buildNumber: 33],

    target: '.']);

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/74c47988-5d6d-4afd-9a60-66f2b489ae7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use CopyArtifact in declarative pipeline

Jon Schewe
Adding this to the copy artifact plugin page will help others. Those pages are wikis so you can just login with your Jira credentials and edit.

On Fri, Oct 6, 2017 at 3:12 PM, dandeliondodgeball <[hidden email]> wrote:
Took me a while to find this, so posting it to make it easier to find.

CopyArtifact syntax (ok, maybe syntax isn't the correct word for this, but you get the idea)

  step ([$class: 'CopyArtifact',

    projectName: "${jobname}",

    filter: "dist/${platform}/${targets}",

    selector: [ $class: 'SpecificBuildSelector', buildNumber: 33],

    target: '.']);

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/74c47988-5d6d-4afd-9a60-66f2b489ae7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALpcnoyBzwxCqJgkrg8jR6uDX5_i8Dg6xGhixsqWFwvFPb2gzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use CopyArtifact in declarative pipeline

dandeliondodgeball
Didn't notice/know that.   I will update that page. Thanks.

On Sat, Oct 7, 2017 at 3:39 PM, Jon Schewe <[hidden email]> wrote:
Adding this to the copy artifact plugin page will help others. Those pages are wikis so you can just login with your Jira credentials and edit.

On Fri, Oct 6, 2017 at 3:12 PM, dandeliondodgeball <[hidden email]> wrote:
Took me a while to find this, so posting it to make it easier to find.

CopyArtifact syntax (ok, maybe syntax isn't the correct word for this, but you get the idea)

  step ([$class: 'CopyArtifact',

    projectName: "${jobname}",

    filter: "dist/${platform}/${targets}",

    selector: [ $class: 'SpecificBuildSelector', buildNumber: 33],

    target: '.']);

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/74c47988-5d6d-4afd-9a60-66f2b489ae7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/OU8Kzl6CJXk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALpcnoyBzwxCqJgkrg8jR6uDX5_i8Dg6xGhixsqWFwvFPb2gzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Chris Foran       | Senior Software Engineer
(617) 586-9962 | [hidden email] 

101 Huntington Ave, 17th Floor
Suite 1300 c/o 3Derm @ BCBSMA
Boston, MA 02199

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAACcGGXL5f6Rp2c9RhTskBVK1%2Bitar-vUMZ1%3D-XRNHmQSC%3DWfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.