“Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

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

“Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

dandeliondodgeball

I discovered the Copy Artifact plugin and was all happy when it worked for me.  But when I went back to my  configuration which makes use of a Jenkinsfile that option wasn’t available.  There is no Build section in the configuration.

 

The first one is a “freestyle” configuration and the other a “pipeline” configuration, maybe?

 

Is there a feature like this available in the Jenkinsfile?

 

Thanks


--
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/3577c344-c3ee-4e04-98aa-9b5238641604%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: “Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

Robert Hales
https://www.cloudbees.com/blog/copying-artifacts-between-builds-jenkins-workflow


On Tuesday, October 3, 2017 at 4:15:47 PM UTC-6, dandeliondodgeball wrote:

I discovered the Copy Artifact plugin and was all happy when it worked for me.  But when I went back to my  configuration which makes use of a Jenkinsfile that option wasn’t available.  There is no Build section in the configuration.

 

The first one is a “freestyle” configuration and the other a “pipeline” configuration, maybe?

 

Is there a feature like this available in the Jenkinsfile?

 

Thanks

<a href="https://lh3.googleusercontent.com/-X_b03I5m8HA/WdQL-yiUXjI/AAAAAAAAAEc/C-5Zi8HRTtQ3IDkDE01ztX0QpCVUcuACgCLcBGAs/s1600/CopyArtifact.PNG" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-X_b03I5m8HA/WdQL-yiUXjI/AAAAAAAAAEc/C-5Zi8HRTtQ3IDkDE01ztX0QpCVUcuACgCLcBGAs/s1600/CopyArtifact.PNG&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-X_b03I5m8HA/WdQL-yiUXjI/AAAAAAAAAEc/C-5Zi8HRTtQ3IDkDE01ztX0QpCVUcuACgCLcBGAs/s1600/CopyArtifact.PNG&#39;;return true;">


--
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/06b12647-c836-4230-8ae8-4f542ff5fd5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: “Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

dandeliondodgeball
Helpful, thanks.

So there is only a scripted pipeline solution, no support for declarative, correct?

--
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/a27c203a-403b-444a-b493-314020553ff9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: “Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

Robert Hales
I don't know of any declarative support, but you can still wrap it in a script{} block in declarative. 

On Wednesday, October 4, 2017 at 10:27:01 AM UTC-6, dandeliondodgeball wrote:
Helpful, thanks.

So there is only a scripted pipeline solution, no support for declarative, correct?

--
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/4b92c0da-fd1e-4457-a664-9781ff32d5a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: “Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

dandeliondodgeball
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']
}

Any ideas? Thanks.

--
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/e1024ae8-43d2-4419-bee3-fd88502148bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: “Copy artifacts from another project” and Jenkinsfiles are exclusive, correct?

dandeliondodgeball
Moved this to new post https://groups.google.com/forum/#!topic/jenkinsci-users/OU8Kzl6CJXk

--
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/c8a8e8b4-4763-4bee-a311-c4a77d3a3f3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.