Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jenkins Pipeline compatibility #4

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

EmteZogaf
Copy link

@EmteZogaf EmteZogaf commented Aug 12, 2016

These changes allow the usage of R plugin in pipeline scripts.

Re-submit of #1 because of accidental merge before review.

@EmteZogaf EmteZogaf force-pushed the make-pipeline-compatible branch 2 times, most recently from 6665fd9 to 8a5751a Compare January 11, 2017 12:02
@kinow
Copy link
Member

kinow commented Jan 12, 2017

Looks nice @EmteZogaf

Will give it a try tonight, and if I can run an R script as before, and also within a pipeline, will merge and release :D

Thanks!

@kinow
Copy link
Member

kinow commented Jan 12, 2017

Actually, had to kill some time, so could test it right now 🎉

Used following script:

a <- c(1,2,3,4)
plot(a)

Success with normal freestyle job.

Success with pipeline job too, using:

node {
   rscript '''
   a <- c(1,2,3,4)
   plot(a)
   '''
}

@EmteZogaf how do you feel about changing from rscript to r, the function name?

@EmteZogaf
Copy link
Author

EmteZogaf commented Jan 12, 2017

OK, single-char commands look a bit strange to me. That's why I chose rscript. But like this is called r-plugin and not rscript-plugin it should be r.

@kinow
Copy link
Member

kinow commented Jan 12, 2017

Indeed @EmteZogaf , but since the language, plug-in, and file extension are "r", that was the first thing I tried (though I could have used the helper screens to pre-populate scripts or found in the code what was the func name).

Are you going to update the pull request, or should I merge and update it?

Add compatibility with workflow/pipeline plugin. Copy behavior of
ShellScript provided by workflow-durable-task-step-plugin for reusing
the durability feature. The call to Rscript is wrapped in a shell
script.
@EmteZogaf EmteZogaf force-pushed the make-pipeline-compatible branch from 8a5751a to 374e6fc Compare January 12, 2017 13:30
@EmteZogaf
Copy link
Author

Updated

@kinow kinow merged commit f0633d6 into jenkinsci:master Jan 12, 2017
@kinow
Copy link
Member

kinow commented Jan 12, 2017

Thanks @EmteZogaf ! Preparing a release now.

@kinow
Copy link
Member

kinow commented Jan 12, 2017

Done. Announced in the biouno mailing list. Was also going to update a Wiki page, that I saw some time ago... I am quite sure there was a Wiki page with the list of plug-ins with pipeline compatibility, but alas I could not locate it.

Thanks again @EmteZogaf

@EmteZogaf EmteZogaf deleted the make-pipeline-compatible branch January 13, 2017 10:51
@EmteZogaf
Copy link
Author

Thanks for accepting the changes.
I found this list https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

@kinow
Copy link
Member

kinow commented Jan 14, 2017

That's the one that I had seen before. PR sent jenkinsci/pipeline-plugin#427

Thanks!

@jglick
Copy link
Member

jglick commented Mar 24, 2017

FWIW I do not think this kind of step is a good idea. Better left to libraries or macros.

But, see JENKINS-37011 & JENKINS-26055.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants