[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title ShiMing Qu commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor We have the similar issue. Our requirement is running the shared lib code inside a Docker container( via Dockerfile agent ) Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Steven Gantz commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor Jesse Glick We've just run into this issue in trying to build a utility library with straight groovy. Everything was working flawlessly until we started trying to manipulate files on the node from the groovy library. Is there really no valid use-case? We have a pretty large CI workflow we are developing and our Jenkinsfile is going to get large pretty quickly. The idea in outsourcing work to the groovy lib was to utilize some object hierarchies. I know this isn't a support forum, but shared libs are intended to only run on master? Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Amir Barkal edited a comment on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor I concur. Here's another use case for this request:When we're developing our CI pipeline, we want to make sure we don't introduce regressions to Jenkins shared libraries, so we have a pipeline that's defined as a gate for our shared library changes. We want to be able to checkout the same library version of the tested branch, and run it for verification. In the below example we want to test have usefulMethod without cluttering that does some linting on our master groovy code inside the shared library repo. The method will fail because it expects the shared library code to be available on "builder1" but the code was checked-out to the Jenkins maser node : . {quote}node("builder1") \{ // This will checkout the shared library into the master node, despite being inside an //explicit node block: lib = library("jenkins-shared-library@$\{env.BRANCH_NAME}") // test that usefulMethod did not break: lib.usefulMethod() }{quote} In order to workaround this we need to checkout the shared library code twice, first time to load the library classes and methods and a second time to bring the code to the current workspace. This of course is not very efficient and puts unnecessary stress on our source control system. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegro
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Amir Barkal commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor I concur. Here's another use case for this request: When we're developing our CI pipeline, we want to make sure we don't introduce regressions to Jenkins shared libraries, so we have a pipeline that's defined as a gate for our shared library changes. We want to be able to checkout the same library version of the tested branch, and run it for verification. In the below example we want to test usefulMethod without cluttering our master node: node("builder1") { // This will checkout the shared library into the master node, despite being inside an //explicit node block: lib = library("jenkins-shared-library@${env.BRANCH_NAME}") // test that usefulMethod did not break: lib.usefulMethod() } Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg updated an issue Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Ronen Peleg Comment: For me, Libraries = GIT Repository which means temporary files to the Master! without cleanup control system. To download repository (call it library if you want but it's a fully source repository files) to the master without properly cleanup system it's a recipe for disaster! Also the Master need to stay clean all the time without a jobs/builds temporary files as library... I also like the suggestion of add new option to run all the pipeline project in specific node, as we already have and exist in normal Jenkins job: "Restrict where this project can be run". so simple so smart.There must be a way to allow users to control the node to where download the library...I don't see any reason that you prevent us from getting this new option. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https:/
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor For me, Libraries = GIT Repository which means temporary files to the Master! without cleanup control system. To download repository (call it library if you want but it's a fully source repository files) to the master without properly cleanup system it's a recipe for disaster! Also the Master need to stay clean all the time without a jobs/builds temporary files as library... I also like the suggestion of add new option to run all the pipeline project in specific node, as we already have and exist in normal Jenkins job: "Restrict where this project can be run". so simple so smart. There must be a way to allow users to control the node to where download the library... I don't see any reason that you prevent us from getting this new option. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg edited a comment on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor For me, Libraries = GIT Repository which means temporary files to the Master! without cleanup control system. To download repository (call it library if you want but it's a fully source repository files) to the master without properly cleanup system it's a recipe for disaster! Also the Master need to stay clean all the time without a jobs/builds temporary files as library... I also like the suggestion of add new option to run all the pipeline project in specific node, as we already have and exist in normal Jenkins job: "Restrict where this project can be run". so simple so smart.There must be a way to allow users to control the node to where download the library... I don't see any reason that you prevent us from getting this new option. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg reopened an issue For me, Libraries = GIT Repository which means temporary files to the Master! without cleanup control system. I don't see any reason that you prevent us from getting this new option. BTW: This feature is already exist on Jenkins normal job (see Jenkins job option: "Restrict where this project can be run"). Reopen this ticket... 10x Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Ronen Peleg Resolution: Won't Do Status: Resolved Reopened Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg updated an issue Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Ronen Peleg Comment: For me, Libraries = GIT Repository which means temporary files to the Master! without cleanup control system.I don't see any reason that you prevent us from getting this new option. BTW: This feature is already exist on Jenkins normal job (see Jenkins job option: "Restrict where this project can be run").Reopen this ticket... 10x Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Ronen Peleg commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor To download repository (call it library if you want but it's a fully source repository files) to the master without properly cleanup system it's a recipe for disaster! Also the Master need to stay clean all the time without a jobs/builds temporary files as library... I also like the suggestion of add new option to run all the pipeline project in specific node, as we already have and exist in normal Jenkins job: "Restrict where this project can be run". so simple so smart. There must be a way to allow users to control the node to where download the library... Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Jesse Glick resolved as Won't Do Use sh/bat steps for all work. Pipeline script itself should be limited to very simple, general orchestration, and interacting directly with Jenkins plugins. JIRA is not a help forum so please do not ask for general advice here. Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Jesse Glick Status: Reopened Resolved Resolution: Won't Do Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues"
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Sean Mitchell commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor Running pipeline code generates load on the server, currently our instance is quite small but my fear is that it will be added factor that will force us to go down the road of multiple Jenkins instances and deal with the complexity - much earlier than teams might expect. Or are we meant to take the statement "If you think you need this, you are not using Pipeline correctly" to mean we should not use pipeline for any real logic or flow control? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Sean Mitchell edited a comment on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor Running pipeline code generates load on the server, currently our instance is quite small but my fear is that it will be an added factor that will force us to go down the road of multiple Jenkins instances and deal with the complexity - much earlier than teams might expect. Or are we meant to take the statement "If you think you need this, you are not using Pipeline correctly" to mean we should not use pipeline for any real logic or flow control? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Kenneth Brooks edited a comment on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor Help me understand how this scenario should work if I'm "using pipelines correctly"Background: All of this should be happening on a slave node (that isn't on the same filesystem as the master).* Run a command to checkout files (could be "checkout scm" step)* Get a handle to one of the files that was checked out and do something with the contents via a shared library in the vars/ directory.This doesn't work today as the shared library will run on the master, yet the files were checked out on the node.How else would we accomplish this functionality? This severely limits the usefulness of any java code inside the global libraries if they can't interact with anything on the nodes, does it not? We aren't asking for the whole pipeline script itself to run on a node. We are asking how to get a cps global lib to run on the node. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Kenneth Brooks reopened an issue Help me understand how this scenario should work if I'm "using pipelines correctly" Background: All of this should be happening on a slave node (that isn't on the same filesystem as the master). Run a command to checkout files (could be "checkout scm" step) Get a handle to one of the files that was checked out and do something with the contents via a shared library in the vars/ directory. This doesn't work today as the shared library will run on the master, yet the files were checked out on the node. How else would we accomplish this functionality? This severely limits the usefulness of any java code inside the global libraries if they can't interact with anything on the nodes, does it not? Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Kenneth Brooks Resolution: Won't Do Status: Resolved Reopened Assignee: Jesse Glick Add Comment
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Jesse Glick resolved as Won't Do Pipeline script always run on the master. There is no way it can run remotely. If you think you need this, you are not using Pipeline correctly. Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Change By: Jesse Glick Status: Open Resolved Resolution: Won't Do Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email t
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Kenneth Brooks commented on JENKINS-40695 Re: Allow running Pipeline shared library functions on executor We would like to see this as well. For example, a lot of the things that happen on a node are file based but the java/groovy code in the global libraries cannot access those files as they seem to run on master. Currently, We disable the master as a node that anything can execute on and force our pipeline scripts to specify node labels (which loads nodes from mesos). This ensures that people aren't 1) tying up the master executors 2) doing something nefarious to the jenkins configuration files from within their pipeline script. The downside of doing this is that the steps will always be running on a node other than master, yet the global libraries are only executing on master. I would be delighted to know if I'm way off base in my thinking here and there is a better approach. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40695) Allow running Pipeline shared library functions on executor
Title: Message Title Owen Wood created an issue Jenkins / JENKINS-40695 Allow running Pipeline shared library functions on executor Issue Type: New Feature Assignee: Unassigned Components: workflow-cps-global-lib-plugin Created: 2016/Dec/27 8:08 PM Priority: Minor Reporter: Owen Wood New feature suggestion. Currently, all shared library functions seem to execute on the master. Allow defining some sort of mechanism to allow specifying an executor for the code execution. Some ideas: by defining this in the library code (something similar to what node(...) definitions do) via a shared library form field that allows defining the agent to run on checkbox on the shared library form that toggles whether code should be run same node as calling Pipeline block Add Comment