Way to have launcher.getChannel().call() use an idle executor?
To put simply I'm creating a security scan into my plugin that I want to run independent of jobs but run on the nodes. I want to have it show up on screen it's running on the node for a few reasons. Is there any examples of a background job (AsyncAperiodicWork) using an executor out there? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e6a9e0b3-6191-40ed-93d2-5d64a1b78bbfn%40googlegroups.com.
Jelly dropdown list with filter?
Is there an option or variant that has a filter in it? Some of the dropdowns I have can get quite large and before I go writing something wanted to see if there was something out there available to plugin developers. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/94458145-6100-452c-a0fb-2d8c6cbd1cd1n%40googlegroups.com.
How to get listener from the Run object
I'm in an area where all I've got is the Run object. Where do I need to go to get the TaskListener so I can write to the logs? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a8f4e88a-902c-4b42-9176-eeb7639d4332n%40googlegroups.com.
Re: Intercepting the "label" in node and changing in a plugin?
That plugin leads me to a few ideas... https://javadoc.jenkins.io/jenkins/model/labels/LabelValidator.html being one area. Basically, the situation is we have one group that is crashing our docker slave so I've set them up with an isolated node. But getting them to change node("docker") to node("docker-isolated") in their pipeline script is a logistics nightmare, so looking for a way to control it in a custom plugin. Blocking them is one option, redirecting them auto-magicly is the better one. On Monday, May 29, 2023 at 6:46:13 PM UTC-4 Mark Waite wrote: > On Monday, May 29, 2023 at 9:29:46 AM UTC-6 you wrote: > > What I'm trying to do is redirect the label someone (well few 100 > actually) has encoded in their pipeline when conditions are met. > > > The implied labels plugin allows the administrator to define new labels > based on existing labels. If the "redirect" happens all the time, then an > implied label might be enough. > > if there is more logic in the redirect, then the implied labels plugin > won't help. > > Mark Waite > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/830e1c0b-3cd7-4347-90dc-739ca9415278n%40googlegroups.com.
Intercepting the "label" in node and changing in a plugin?
What I'm trying to do is redirect the label someone (well few 100 actually) has encoded in their pipeline when conditions are met. Without getting into too much detail on the reasons, can't change the pipeline code, and the logic is going to be more OS/DB driven outside Jenkins so want to do via a plugin. Which extension point listener can/should I tie into and how would I override what label is going to be executed on? I only need to worry about pipeline code, freestyle jobs will not be affected. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5d1b9675-a6a0-42c2-8bcb-2501358049fbn%40googlegroups.com.
Re: Default selection in jelly with cookies
Turns out I was thinking way to complicated: Then on the object: So on the local storage front. Is there a h. function equivalent? How would I change the set? On Monday, May 22, 2023 at 10:57:18 AM UTC-4 ullrich...@gmail.com wrote: > Why do you want to use cookies? This is better implemented by storing the > value in the browser's local storage. > > Example: > https://github.com/jenkinsci/data-tables-api-plugin/blob/831d74b746337e6990c6aae5bff2591b2308103d/src/main/webapp/js/table.js#L148 > > > > Am 22.05.2023 um 16:36 schrieb Michael Carter : > > Got a page with some with filldependson set. Trying to use > cookies to remember the last selection. > > So few questions. Is there an example of this I can follow in some plugin > somewhere? > > I can use jquery to select using > > jQuery('#object').val(cookie.select1) > .trigger("change") > > It selects the object but can't seem to get it to trigger the dependant > fill for the next object. What event is it listening triggering on? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/67cb3eb3-f2bb-49a4-959d-57683083a3den%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/67cb3eb3-f2bb-49a4-959d-57683083a3den%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0c02494d-ba97-4022-9105-4a909e712338n%40googlegroups.com.
Default selection in jelly with cookies
Got a page with some with filldependson set. Trying to use cookies to remember the last selection. So few questions. Is there an example of this I can follow in some plugin somewhere? I can use jquery to select using jQuery('#object').val(cookie.select1) .trigger("change") It selects the object but can't seem to get it to trigger the dependant fill for the next object. What event is it listening triggering on? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/67cb3eb3-f2bb-49a4-959d-57683083a3den%40googlegroups.com.
Re: How does /monitoring skip starting splash page?
"jenkins is starting up" is the screen I'm talking about. https://plugins.jenkins.io/monitoring/ is available before the init level of COMPLETED is reached so you can troubleshoot things as jenkins is starting up. Analyzed their code and couldn't quite figure out what allows them to do it. They do have stuff in there about the crumb and security so maybe that's what is allowing it. On Wednesday, February 8, 2023 at 2:02:38 AM UTC-5 ga...@gavinmogan.com wrote: > Can you share code? I would assume a root action with no auth wouldn't > care about ... wait when you say splash screen, do you mean the "jenkins is > starting up" or the "welcome wizard"? I would assume a root action wouldn't > care about the welcome wizard, but the starting up screen my only guess is > you have to have some sort of init hook that changes the order of things. > > > https://github.com/jenkinsci/prometheus-plugin/blob/master/src/main/java/org/jenkinsci/plugins/prometheus/rest/PrometheusAction.java > > says unprotecetedrootaction, which probably means it doesn't wait for > auth/acl to startup > > But these are just guesses > > On Tue, Feb 7, 2023 at 11:47 AM Michael Carter > wrote: > >> Short version I've got a custom prometheus stats page for my plugin. But >> I want to make it available early. How does the /monitoring plugin skip >> the starting splash page? Want to do the same thing? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-de...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/dc9615d5-8840-4c30-b3f2-da956124d281n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/dc9615d5-8840-4c30-b3f2-da956124d281n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/213135ec-fc02-406a-a203-6a3cfadb401cn%40googlegroups.com.
How does /monitoring skip starting splash page?
Short version I've got a custom prometheus stats page for my plugin. But I want to make it available early. How does the /monitoring plugin skip the starting splash page? Want to do the same thing? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/dc9615d5-8840-4c30-b3f2-da956124d281n%40googlegroups.com.
Re: How does dropdownList work and what can affect the descriptorImpl
Just to close the loop. Found it. I was using all().get("class") in my code... and for some reason, the Jira plugin was activating it and I was getting duplicates only on the "definition" block of the job page. Switched to ExtensionList.lookupSinglton() and the problem went away. On Monday, May 9, 2022 at 2:18:44 PM UTC-4 Michael Carter wrote: > So if I run this in the script console and only find one: > > import jenkins.model.*; > > List d = Jenkins.instance.getExtensionList(Descriptor.class); > > for (descriptor in d) { > println descriptor > } > > Would that suggest that whatever I've done is only loaded during the > "/configure" page load? or is that groovy script above wrong? > > On Monday, May 9, 2022 at 1:38:26 PM UTC-4 db...@cloudbees.com wrote: > >> On Mon, May 9, 2022 at 7:13 PM Michael Carter >> wrote: >> >>> debug var.: >>> org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@72d8eb26 >>> >>> debug currDesc: >>> org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@6904e8d2 >>> >> >> This means there are two different instances of the same descriptor. >> Descriptors are expected to be instantiated once, typically during load by >> processing the @Extension annotation. So I'd check whether you're >> instantiating the descriptor somewhere manually, or otherwise messing with >> descriptor/extension lists. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/023683cb-75de-414d-9519-b90bb5c895c2n%40googlegroups.com.
Re: How does dropdownList work and what can affect the descriptorImpl
So if I run this in the script console and only find one: import jenkins.model.*; List d = Jenkins.instance.getExtensionList(Descriptor.class); for (descriptor in d) { println descriptor } Would that suggest that whatever I've done is only loaded during the "/configure" page load? or is that groovy script above wrong? On Monday, May 9, 2022 at 1:38:26 PM UTC-4 db...@cloudbees.com wrote: > On Mon, May 9, 2022 at 7:13 PM Michael Carter > wrote: > >> debug var.: >> org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@72d8eb26 >> debug currDesc: >> org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@6904e8d2 >> > > This means there are two different instances of the same descriptor. > Descriptors are expected to be instantiated once, typically during load by > processing the @Extension annotation. So I'd check whether you're > instantiating the descriptor somewhere manually, or otherwise messing with > descriptor/extension lists. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/caa3f13e-2697-4af1-87d2-dc0761e8b137n%40googlegroups.com.
How does dropdownList work and what can affect the descriptorImpl
This is actually related to https://issues.jenkins.io/browse/JENKINS-67055 Something in my own plugin has caused the same issue and I'm trying to track down what I'm doing that's affecting the org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl instance. >From what I can see in the source of the dropdownlist jelly file, you're comparing memory address hash with... (from the toString()) selected="${current.descriptor==descriptor || (current==null and descriptor==attrs.default)}" When I modify that in the jenkins.war to see what's in there I noticed this is what it's seeing. The only difference is the hashcode. debug var.: org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@72d8eb26 debug currDesc: org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition$DescriptorImpl@6904e8d2 I'm at a bit of a loss trying to figure out how I'm affecting this object. Tried looking at the mixing-security-realm-plugin to see what it's doing with no luck either. One thing I did try is to alter that dropdownlist jelly to: selected="${current.descriptor.getClass().getName() == descriptor.getClass().getName() || (current==null and descriptor==attrs.default)}" staplerClass="${descriptor.clazz.name}" lazy="descriptor,it,${capture}"> Works fine. So any ideas where I should look to track down what's going on here? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/39400c63-ed8c-4498-8359-508a85d5fbacn%40googlegroups.com.
QueueListener when pipeline node command is waiting?
> Still waiting to schedule task > There are no nodes with the label ‘notexist’ I know about the RunListener, and QueueListener... were do I hook into on the front of detecting a node execution. Basically, want to have an alert system to slack if a developer executes a "node" command and it's been waiting for a while, or in some cases days till someone notices. Just need a starting point here. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANjusZcYTwNnsQg0M0r5TbzoNVXJpdkZJ%2BCxvuKbP3yU-%2BCG1g%40mail.gmail.com.
HyperlinkNote for FilePath?
So have a hudson.FilePath object. Want to display a link in the console log to the workspace link of that file. How do I get the base url path from the hudson.FilePath or do I get it from somewhere else? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/6aff91bf-ecc2-433e-a46d-f041e1f03b44n%40googlegroups.com.
Disable job with reason?
Basically have a need to have it when a job is disabled there's a reason associated with why. Also trigger and external system when it is. Is there such a plugin and/or where do I hook in to create this extension? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/47675d76-904f-4318-8c71-e3c338341c84n%40googlegroups.com.
Adding groups from a second source?
Basically I want to setup employee hierarchy groups as there's some permissions we want to grant based on who they work for. The hierarchy is stored in a DB table and it isn't possible to get it added to SAML/SSO as a "Group". Been trying that route from 2020 to no avail. Can someone point me at the extension points or libraries which I could potentially add "groups" from a second, and/or third source(FYI: did looked at Role Based stragegy but for various reason we need to stick with "Project-based Matrix Authorization Strategy" so custom roles managed via script is out of the question) Thanks. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/169e8392-76cf-4d27-a21b-5219cde3c1b4n%40googlegroups.com.
Running my own update centre behind a firewall, and getting plugin change logs
Two related questions. 1. I see there's this backend-update-center2 but I see several copies... is there an official jenkins copy? (using this currently : https://github.com/ikedam/backend-update-center2) 2.https://github.com/jenkinsci/junit-plugin/releases is there any way to report back the change log of each plugin to backend-update-center2? or add to the release-history.json so I could add custom data to the releases? Basically want to develop a page on my Jenkins server that has all the plugins updated between maintenance windows with the plugins change log for that time period.Just wanted to see what was out there before developing anything. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f35d584a-a595-4566-a63d-a2443f945c3cn%40googlegroups.com.
Pipeline step to append to a file...
I have a situation where I'm piecing together a large file. Is there some pipeline command for appending to a file? Trying to keep it in memory is problematic. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0ecbbb78-08e0-4d57-9f5f-e64aff51c17cn%40googlegroups.com.
Re: h.util.RobustReflectionConverter#doUnmarshal: Cannot convert type java.util.LinkedHashMap to type com.google.gson.internal.LinkedTreeMap?
Action/JobProperty is what I needed to point me in the right direction. Most of my code was originally ported over from a SpringBoot application which is still underactive development. Slowly removing the code... but at least I know where to look. Thanks. On Thursday, May 13, 2021 at 12:07:58 PM UTC-4 Jesse Glick wrote: > On Thu, May 13, 2021 at 11:51 AM Michael Carter > wrote: > >> I'm know this has to do with the fact I have code using gson libraries >> for json manipulation which I haven't fully converted. >> > > Somewhere you have a class which is serialized via XStream (an `Action` > attached to a build, a `JobProperty`, etc. etc.) which has a persistent > field whose actual type is from the GSON library, which is forbidden as of > JEP-200 and was never a good idea. I am not familiar with the cause of this > specific error. Search XML files in your `$JENKINS_HOME` for `gson` and it > should become clear what needs to be fixed. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4c8b2e74-2803-49d1-8306-576d167a9ffen%40googlegroups.com.
h.util.RobustReflectionConverter#doUnmarshal: Cannot convert type java.util.LinkedHashMap to type com.google.gson.internal.LinkedTreeMap?
When I access a job view I get spammed with: 2021-05-13 15:40:25.448+ [id=500] WARNING h.util.RobustReflectionConverter#doUnmarshal: Cannot convert type java.util.LinkedHashMap to type com.google.gson.internal.LinkedTreeMap 2021-05-13 15:40:25.456+ [id=500] WARNING h.util.RobustReflectionConverter#doUnmarshal: Cannot convert type java.util.LinkedHashMap to type com.google.gson.internal.LinkedTreeMap I'm know this has to do with the fact I have code using gson libraries for json manipulation which I haven't fully converted. But I'm having trouble locating what I need to change for this specific thing. What's called when you click the job view tabs here? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d5e2d928-9cfc-4127-888c-17101e189cden%40googlegroups.com.
Re: Jenkins won't start after plugin update?
Funny never fails, searching for an answer on and off since Apr 20th...5 minutes after asking for help... actually found it... (was what you were basically saying) Turns out one of the other developers/admins quietly changed the slaveAgentPort port and didn't tell anyone. When I asked in our team meeting everyone said they hadn't changed anything in months. Someone lied. Too bad this only tracks the user as "SYSTEM"... think people forget we have this thing enabled... good thing too. 2021-04-18_17-00-25/config.xml: 45001 2021-04-19_09-46-03/config.xml: 443 On Mon, Apr 26, 2021 at 12:23 PM 'Gavin Mogan' via Jenkins Developers < jenkinsci-dev@googlegroups.com> wrote: > Permission denied sounds like your either using a port that is already > used, or using below 1024. I don't think either are plugin related per say. > > On Mon, Apr 26, 2021 at 9:14 AM Michael Carter > wrote: > >> I was testing out my new changes to my plugin. Did update all on all >> plugins. >> >> Did systemctl restart jenkins. >> >> Now starting I get: >> >> 2021-04-26 16:08:28.416+ [id=86] INFO >> hudson.model.AsyncPeriodicWork#lambda$doRun$0: >> Finished Download metadata. 461 ms >> 2021-04-26 16:08:28.941+ [id=34] INFO >> jenkins.InitReactorRunner$1#onAttained: >> Completed initialization >> 2021-04-26 16:08:29.077+ [id=22] SEVERE hudson.util.BootFailure#publish: >> Failed to initialize Jenkins >> java.net.SocketException: Permission denied >> at sun.nio.ch.Net.bind0(Native Method) >> at sun.nio.ch.Net.bind(Net.java:444) >> at sun.nio.ch.Net.bind(Net.java:436) >> at >> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225) >> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) >> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67) >> at hudson.TcpSlaveAgentListener.(TcpSlaveAgentListener.java:100) >> at jenkins.model.Jenkins.launchTcpSlaveAgentListener(Jenkins.java:1298) >> at jenkins.model.Jenkins.(Jenkins.java:985) >> at hudson.model.Hudson.(Hudson.java:85) >> at hudson.model.Hudson.(Hudson.java:81) >> at hudson.WebAppMain$3.run(WebAppMain.java:295) >> Caused: hudson.util.HudsonFailedToLoad >> at hudson.WebAppMain$3.run(WebAppMain.java:312) >> 2021-04-26 16:08:29.169+ [id=22] INFO jenkins.model.Jenkins#cleanUp: >> Stopping Jenkins >> >> Tried disabling the plugin in question, disabling all nodes, copying over >> the jenkins.war file sync'ing the plugin directory from a working setup >> >> how do I track down the main cause? >> >> The other two servers I have using the same setup works fine so I'm >> assuming some file got corrupted somewhere. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-dev+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/cca3a6f8-ca9f-4d2a-86be-06c9cb075ea3n%40googlegroups.com >> <https://groups.google.com/d/msgid/jenkinsci-dev/cca3a6f8-ca9f-4d2a-86be-06c9cb075ea3n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/3z_hNyCCtWs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > jenkinsci-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvmqaOO%2Bu6Y1Uha2SSOOEdNMWBoHsuBuMgv2x_D%3D_Javw%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvmqaOO%2Bu6Y1Uha2SSOOEdNMWBoHsuBuMgv2x_D%3D_Javw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- *G. Michael Carter* Contact: 1-519-217-0441 Google Talk: xmpp:mikeycarter1...@gmail.com Instagram: mikey.carter Facebook: https://www.facebook.com/MikeyCarter1974 <http://livedvd.carterfamily.ca/> <http://www.openstreetmap.org/?lat=43.9216&lon=-80.105&zoom=14&layers=B000FTF> <http://www.openstreetmap.org/?lat=43.9216&lon=-80.105&zoom=14&layers=B000FTF> -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANjusZfamaiRpuq5C2TfaroqToA-puzqiHKsj0TWd08pwCzUtA%40mail.gmail.com.
Jenkins won't start after plugin update?
I was testing out my new changes to my plugin. Did update all on all plugins. Did systemctl restart jenkins. Now starting I get: 2021-04-26 16:08:28.416+ [id=86] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 461 ms 2021-04-26 16:08:28.941+ [id=34] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization 2021-04-26 16:08:29.077+ [id=22] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins java.net.SocketException: Permission denied at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:444) at sun.nio.ch.Net.bind(Net.java:436) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67) at hudson.TcpSlaveAgentListener.(TcpSlaveAgentListener.java:100) at jenkins.model.Jenkins.launchTcpSlaveAgentListener(Jenkins.java:1298) at jenkins.model.Jenkins.(Jenkins.java:985) at hudson.model.Hudson.(Hudson.java:85) at hudson.model.Hudson.(Hudson.java:81) at hudson.WebAppMain$3.run(WebAppMain.java:295) Caused: hudson.util.HudsonFailedToLoad at hudson.WebAppMain$3.run(WebAppMain.java:312) 2021-04-26 16:08:29.169+ [id=22] INFO jenkins.model.Jenkins#cleanUp: Stopping Jenkins Tried disabling the plugin in question, disabling all nodes, copying over the jenkins.war file sync'ing the plugin directory from a working setup how do I track down the main cause? The other two servers I have using the same setup works fine so I'm assuming some file got corrupted somewhere. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/cca3a6f8-ca9f-4d2a-86be-06c9cb075ea3n%40googlegroups.com.
Re: Any where from the Run object to find out how much CPU the job is consuming?
Guess I should have added more context. I have users adding this type of code to their pipeline scripts. loop { retry(10) { withCredetials { ... some code. that takes about 10ms. or less } } } Which of course causes a lot of CPU usage on the master due to the frequent lookups to the identical username/password.What I'm looking is there a way from inside Jenkins https://javadoc.jenkins-ci.org/hudson/model/Run.html to get at how much CPU/Memory the Pipeline Job is used during it's run? I want to write a Jenkins Plugin (Like an Action Badge or something) to report on it to screen and save to an external audit DB. But I first must get the resource usage from inside Jenkins somehow. Hence the question can I get to it somehow from https://javadoc.jenkins-ci.org/hudson/model/Run.html or do I have to hook into the onStarted/onCompleted triggers with some sort of monitor? On Tuesday, March 30, 2021 at 3:38:03 PM UTC-4 Jesse wrote: > Run `jstack`? Not sure what this plugin is or how it relates to diagnosing > high CPU usage. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f469a2b6-18d5-4351-bd4a-19b642479647n%40googlegroups.com.
Any where from the Run object to find out how much CPU the job is consuming?
Basically the use case. We've got a few jobs doing: loop { retry(10) { withCredetials { ... some code. that takes about 10ms. or less } } } It's eating up 100% CPU on the master. I suspect we have other(s)/cases of people doing things like this and I'm trying to add a way to detect the high CPU usage via my plugin. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b79274ed-e0d3-4503-aa4d-a245e15def6en%40googlegroups.com.
Replacing tokens in webapps files?
Bit lost here. Trying to include some webapps files but have a ~~RELEASE~~ variable to replace. To do this in other maven projects I'd do something like this: org.apache.maven.plugins maven-resources-plugin 2.7 true org.apache.maven.shared maven-filtering 1.3 UTF-8 ${*} #{*} ~~*~~ How do I get this working with the maven-hpi-plugin? Or another way to do it and replace the ~~*~~ with whatever variables I have defined in the pom.xml? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1dac0b2f-75fb-4a76-bc84-7f18840362ddn%40googlegroups.com.
Is there a way to ignore nested node commands?
Not sure if this is the right place for this type of question... but node { node('agent'){ } } Any way to block the nested node. Keep getting these developers writing loops with these nested nodes and wonder why their job with 4 levels of nesting is not running on an executor of 3. (and all calling the same node) I know firing them is always an option :) Just wanted to see if there was a way to limit or block the nesting and have it just ignored. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/98a65d23-22de-4daa-b68c-5e9da13a5a2fn%40googlegroups.com.
Connecting to an oauth2 protected API?
I've basically been tasked with "converting to oauth2" for all my API calls. Can someone point me in the right direction... to a java tools kit that can make it easy to call an oauth protected API service inside my java plugin? Thanks. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/42c25176-9205-434e-b3d2-d18cf66d257cn%40googlegroups.com.
How do I get the Run/Job of a TimerTrigger?
So what I'm doing. Trying to make a SimpleParameterDefinition persistent by looking up the previous success full build and using it's parameters as the default for the timer triggered job. hudson.triggers.Trigger#checkTriggers: hudson.triggers.TimerTrigger.run() failed for org.jenkinsci.plugins.workflow.job.WorkflowJob@7acbb62c So Stapler.getCurrentRequest().findAncestorObject(Job.class); doesn't work inside the getDefaultParameterValue How do I get at the Job definition here? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/670387dd-1307-4428-91ad-e59f2bb258dan%40googlegroups.com.
Re: ExtensionFinder$GuiceFinde ClassNotFoundException
For the record... found it. I had rebranded Nov 1st, and the old plugin was still there. So it was loading it. work/plugins/JenkinsPlugin-20.09.0-${timestamp}.hpl work/plugins/JenkinsPlugin-20.11.0-${timestamp}.hpl On Friday, November 27, 2020 at 5:22:31 PM UTC-5 Oleg Nenashev wrote: > Hi! Your plugin needs the Jira REST Client library, bit it looks like it > was not loaded on the Jenkins startup. Most likely it means that the > library was not added to the plugin HPI and was not provided by another > plugin. If you could share your pom.xml, it might help to pinpoint the issue > > On Friday, November 27, 2020 at 9:47:41 PM UTC+1 mikeyca...@gmail.com > wrote: > >> Trying to add Jira functionality to a parameter. I get this when it >> starts up. Classes aren't getting loaded into what ever space the >> parameters are loading into. >> >> Am I missing a white list or something? >> >> 2020-11-27 20:39:04.321+ [id=42] WARNING >> h.ExtensionFinder$GuiceFinder$SezpozModule#configure: >> Failed to load io.jenkins.plugins.JenkinsPlugin.JiraPack >> java.lang.ClassNotFoundException: >> com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory >> at >> jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387) >> at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342) >> at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:351) >> Caused: java.lang.NoClassDefFoundError: >> Lcom/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory; >> at java.lang.Class.getDeclaredFields0(Native Method) >> at java.lang.Class.privateGetDeclaredFields(Class.java:2583) >> at java.lang.Class.getDeclaredFields(Class.java:1916) >> at >> hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:503) >> >> -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/82977ea2-be05-4826-b5ff-b85a01915819n%40googlegroups.com.
ExtensionFinder$GuiceFinde ClassNotFoundException
Trying to add Jira functionality to a parameter. I get this when it starts up. Classes aren't getting loaded into what ever space the parameters are loading into. Am I missing a white list or something? 2020-11-27 20:39:04.321+ [id=42] WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load io.jenkins.plugins.JenkinsPlugin.JiraPack java.lang.ClassNotFoundException: com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) Caused: java.lang.NoClassDefFoundError: Lcom/atlassian/jira/rest/client/internal/async/AsynchronousJiraRestClientFactory; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2583) at java.lang.Class.getDeclaredFields(Class.java:1916) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:503) -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f98c6431-298a-4437-9ce7-42ce54bb549bn%40googlegroups.com.
Call a declarative pipeline from within a declarative pipeline?
Before I start looking at some hacky way to do this. Can I define a declarative pipeline script in my jenkins job. Then after the git download... call one from the git clone and run it? Is there something to do this out there? A plugin or command? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a232dbc2-8a1a-44fc-8ede-15daabf3dd9en%40googlegroups.com.
FilePath crawl subdirectories example.
Have this case where I want to crawl a subdirectory for xml files from a workspace in a plugin. Is there an example out there of doing such a crawl with the FilePath object? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0e9c3165-43f2-45d2-9c48-a47109f82120n%40googlegroups.com.
Base64 a string with pipeline?
I've got a bunch of developers all looking to have me approve, what feels like 20 different ways to base64 encode a string. Is there a common method already approved or a prefered way of doing it in pipeline scripts? Was thinking of writing a small plugin command just so everyone is on the same page... but thought I'd ask before coding something like that up. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a8b11aa1-d91b-474d-a8ec-b5394a41f558n%40googlegroups.com.
Loading JenkinsRule from pre-defined xml files?
Any docs on how to get something like this working? @LocalData("Jenkins-Enabled") @ClassRule public static JenkinsRule jenkinsRule = new JenkinsRule(); Basically, I want to only start one server for this test, and I want to use the same shared config.xml and data. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/914895a3-f12d-4660-8e0c-712c92a3f3c6n%40googlegroups.com.
No page found 'config.jelly'
org.apache.commons.jelly.JellyTagException: jar:file:.../webapp/WEB-INF/lib/jenkins-core-2.235.1.jar!/lib/form/repeatableProperty.jelly:78:69: No page found 'config.jelly' for class hudson.model.Hudson I'm presented with this error so I've forgotten a config.jelly somewhere. Is there any way to get the absolute path of the file it's looking for? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/75cc60fc-82db-4a03-bb1e-85bc725a2871n%40googlegroups.com.
Re: Turn on things like ansi colour via builder when added
Sorry was out hiking when I had this thought so wanted to ask the question while I was thinking of it so only had my phone, and guess I wasn't very descriptive. "extends Builder implements SimpleBuildStep" So really this is a two part idea. When someone selects the "builder step" I've made in a freestyle build is it possible to force things to be checked, like the ansi check box. The other thought I was having is it possible to have it so when you select the builder in a freestyle job it automatically adds a parameter to the parameter section. This builder step I'm building relies on a string input so wanted to make it as seamless as possible. As well as I said above I keep forgetting to turn on the ansi console in the freestyle jobs so I can only imaging the developers I'm making this for are going to forget too. On Sunday, September 6, 2020 at 5:04:23 PM UTC-4 ga...@gavinmogan.com wrote: > whats a builder command? > > you can use options block in a pipeline. > If your able to mess with the build actions, you can probably do the same > as > https://github.com/jenkinsci/ansicolor-plugin/blob/master/src/main/java/hudson/plugins/ansicolor/AnsiColorBuildWrapper.java#L86 > > On Sun, Sep 6, 2020 at 1:53 PM Michael Carter > wrote: > >> Is it possible to turn on features/wrappers from a builder command? I >> use ansi colour a lot and tend to forget to turn it on. Was wondering if >> I could turn on with a builder command and basically make it so you can >> uncheck? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-de...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/828f8f87-75e6-418c-b644-fafb73c7e2eeo%40googlegroups.com >> . >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0131266e-4803-4679-b481-7313f7a15717n%40googlegroups.com.
Turn on things like ansi colour via builder when added
Is it possible to turn on features/wrappers from a builder command? I use ansi colour a lot and tend to forget to turn it on. Was wondering if I could turn on with a builder command and basically make it so you can uncheck? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/828f8f87-75e6-418c-b644-fafb73c7e2eeo%40googlegroups.com.
Re: SimpleBuildStep return value?
Use case. I'm taking these REST enabled SQL engines we have and turning it into one command. Mostly this would be used for datafixes so the large portion would enter the sql and just want to know what passed/failed. Which I'm dumping the json output to a file and turning the results of the statements into junit file(s) which are reported up to the "Test Results" page. This is about 90% of cases and will make those 1000+ users happy. Then I've got the very few people that will select something and want to get at the data. These users I'm dumping the json to a flat file. So the freestyle users will just "cat | jq ." field sort of thing. The pipeline scripted people will just "readJson" and be happy. Then I've got two-three users who will insist on scripted pipeline and use the fact they have to use two commands not one as a reason to scrap the entire jenkins project. So at this stage just trying to eliminate that second "readJson" call without having to write a "step" with identical code for both freestyle and pipeline. If it's not possible... I'll just have to engage these people in a fight when it comes up. On Wednesday, August 26, 2020 at 4:56:33 PM UTC-4 Jesse Glick wrote: > On Wed, Aug 26, 2020 at 1:51 PM Michael Carter > wrote: > > Really don't want to repeat code between pipeline/freestyle as my > commands need both. > > Well, you cannot return values from `SimpleBuildStep` as that would > not work in freestyle, or for that matter in Declarative Pipeline. You > _can_ return values from an explicit `Step`, for use in Scripted > Pipeline, though you may want to consider alternate designs that do > not force scripting on the user. With no context it is impossible to > offer suggestions. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4ec5b755-2c2e-479a-80f4-ed752d28dd78n%40googlegroups.com.
Re: SimpleBuildStep return value?
I write the output to a file so, reading the json output from the file is my backup solution. Really don't want to repeat code between pipeline/freestyle as my commands need both. Next angle... any way to or example of an "out" variable? eg: def value myStep input: "something, output: value On Wednesday, August 26, 2020 at 10:56:37 AM UTC-4 ullrich...@gmail.com wrote: > I don’t think that this is possible, you need to write a Step. (Or your > SimpleBuildStep creates an action that you can read after the step call.) > > Am 25.08.2020 um 23:41 schrieb Michael Carter : > > SimpleBuildStep when I use it in pipeline how do I get it to feed back > something? > > eg: > > def myValue = mySimpleBuildStepCmd > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/0a7c8744-d0e1-40a5-8bfd-0a18910235bbn%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/0a7c8744-d0e1-40a5-8bfd-0a18910235bbn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/fefc9cee-4d07-4537-99f6-78904d218b26n%40googlegroups.com.
SimpleBuildStep return value?
SimpleBuildStep when I use it in pipeline how do I get it to feed back something? eg: def myValue = mySimpleBuildStepCmd -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0a7c8744-d0e1-40a5-8bfd-0a18910235bbn%40googlegroups.com.
Re: Test Results (Junit) is there an entry method I can use over generating xml?
That was easier than I thought. Thanks. On Tuesday, August 25, 2020 at 3:24:40 PM UTC-4 ullrich...@gmail.com wrote: > This should be feasible. Here is the part of the code that fills in the > results: > > https://github.com/jenkinsci/junit-plugin/blob/master/src/main/java/hudson/tasks/junit/JUnitResultArchiver.java#L172 > > > Am 25.08.2020 um 18:48 schrieb Michael Carter : > > Basically I have a bunch of SQL statements in my plugin I was going to > write to a junit xml file then use a junit post step for uploading... but > then thought... Can I some how combine them? > > Is there a method I can call that adds Junit Tests cases, that I can call > for each sql so I can report the "test" as failed/success based on it's > execution? > > Or is still the best way to have my command generate an xml file then feed > into the junit command? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/d2284677-183a-4e52-80da-0a16b07b269en%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/d2284677-183a-4e52-80da-0a16b07b269en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ed18a844-09dd-498f-8da9-f34619a92355n%40googlegroups.com.
Test Results (Junit) is there an entry method I can use over generating xml?
Basically I have a bunch of SQL statements in my plugin I was going to write to a junit xml file then use a junit post step for uploading... but then thought... Can I some how combine them? Is there a method I can call that adds Junit Tests cases, that I can call for each sql so I can report the "test" as failed/success based on it's execution? Or is still the best way to have my command generate an xml file then feed into the junit command? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d2284677-183a-4e52-80da-0a16b07b269en%40googlegroups.com.
Feature switch, is there a way to turn off a build/publisher/step?
Want to be able to turn off a command so it won't show in freestyle jobs, pipeline syntax generator, etc... Is there a way to do this. First part is for a brand new function being worked on but we have to package the plugin and don't anyone using the new command yet. That way if ready we just say flip a checkbox on a config page. The other side is is there a way to disable it with a switch. That way anyone using it the command is just skipped? Realize this we could just code in the switch ... wanted to see if there was a more standard way. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0375422d-6f45-47b1-ad2b-95563b846703n%40googlegroups.com.
Re: What makes Credential Parameter special that it can be used in Bind area?
Thanks that got me to where I needed to be. my solution was a fresh class modelled after CredentialsParameterValue... didn't realize there was a step actually looking for the CredentialsParameterValue class. So now I'm extending it and heavily overriding everything. My solution is working now. Thanks again. Michael On Friday, August 21, 2020 at 11:39:17 AM UTC-4 msi...@cloudbees.com wrote: > More info is in that doc elsewhere by the way such as the guide for > exposing said UI: > > https://github.com/jenkinsci/credentials-plugin/blob/master/docs/consumer.adoc#providing-a-ui-form-element-to-let-a-user-select-credentials > > On Fri, Aug 21, 2020 at 10:38 AM Matt Sicker wrote: > > > > As long as the UI in question is calling > > CredentialsProvider.findCredentialsById(), that will automatically > > parse the ${} syntax and replace them with parameter values. At a > > super low level, this works via the following invisible action > > attached to the build: > > > https://github.com/jenkinsci/credentials-plugin/blob/master/docs/consumer.adoc#binding-user-supplied-credentials-parameters-to-builds > > > > On Thu, Aug 20, 2020 at 4:29 PM Michael Carter > > wrote: > > > > > > Was designing my own "Credential Parameter" (basically a clone of the > existing one with some extra on screen filtering) and it wasn't working... > kept getting: > > > > > > ERROR: Could not find credentials entry with ID '${Testing}' > > > > > > In trying to trace the problem... if I use a String parameter. I get > the same error. So my question what makes the "Credential Parameter" > special that you can use it's ${name} in the freestyle jobs Bind area for > pulling passwords to variables? > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Jenkins Developers" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to jenkinsci-de...@googlegroups.com. > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/31918aae-5e4e-46c8-ae39-6e80363d37a3n%40googlegroups.com > . > > > > > > > > -- > > Matt Sicker > > Senior Software Engineer, CloudBees > > > > -- > Matt Sicker > Senior Software Engineer, CloudBees > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0bf1753f-bcac-4095-b565-6694d20fcd91n%40googlegroups.com.
What makes Credential Parameter special that it can be used in Bind area?
Was designing my own "Credential Parameter" (basically a clone of the existing one with some extra on screen filtering) and it wasn't working... kept getting: ERROR: Could not find credentials entry with ID '${Testing}' In trying to trace the problem... if I use a String parameter. I get the same error. So my question what makes the "Credential Parameter" special that you can use it's ${name} in the freestyle jobs Bind area for pulling passwords to variables? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/31918aae-5e4e-46c8-ae39-6e80363d37a3n%40googlegroups.com.
In the pipeline job, is it possible to add to the "try sample... " drop down?
When you are in the configure screen of the pipeline job. there's a drop down over the box saying "Try Sample Pipeline..." Is it possible to add custom entries to that currently? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/945c312a-d853-4d20-bca6-38a6a92e055eo%40googlegroups.com.
Re: New Job/Project Type
Added this to my research doc to look into. Thing I like about the plugin's new job type is it's locked into our development cycle. If it's an "in Jenkins" config setup the risk of people making "from the hip" changes is rather high. That said ... guess that's what the config history plugin is for. Just need to layout the pros and cons right now. In some case no but in some... Yes, they need access to the "configuation" screen. Which is why I'm looking at options. One of the current solutions is an approval system around an install.pipeline script, with their custom programming. Then all 1000+ developers code goes through a single job. But that solution gets scrutiny so seeing what's possible. Just for completeness is there a doc/tutorial on the "not recommend creating a new job type" somewhere? On Friday, August 7, 2020 at 9:52:21 AM UTC-4, Jesse Glick wrote: > > On Thu, Aug 6, 2020 at 10:07 PM Michael Carter > > wrote: > > what I'm investigating is to create is a few "secure" templates. That > is create a job type where the "builder" and/or "publishers" are basically > locked in and the people using them have only a few of the "freestyle" > options. > > As Gavin alluded to, this is precisely the use case for the CloudBees > CI template feature: GUI configuration of jobs with only a limited > number of options, using a sort of RAD builder for Jenkins form > controls. (This relies on a custom *New Item* type and custom > *Configure* screen, _not_ a custom job type internally.) That feature > is usually combined with another that allows for the *New Item* screen > on a given folder to be locked down to custom selections, and with > folder-scoped role-based access control. > > Various OSS plugins and systems exist in this space, with more of a > focus (as far as I am aware) on eliminating the need for duplication > rather than literally blocking users from doing something else. > > If you are not tied to GUI configuration, it may suffice to simply > give users only read access to Jenkins (plus *Job/Build* as needed) > and define all job behaviors via code, which can be controlled at the > repository permission level and through programmatic validation. The > `job-dsl` plugin is often used for this purpose. Another option is to > use multibranch Pipeline, perhaps even an organization folder, with > one of the plugins offering a special recognizer rather than the > default of reading `Jenkinsfile`; there are a couple of OSS plugins > for this, and CloudBees CI also has a version. > > I really would not recommend creating a new job type. It is a major > endeavour and poses a lot of interoperability issues. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d1441fa5-edf3-49b6-b3a4-e0d600084c01o%40googlegroups.com.
Re: Snippet Generator: any way to manipulate the format the "generate" button creates?
Still grappling with this term "PR"? On Fri, Aug 7, 2020 at 9:39 AM Jesse Glick wrote: > On Thu, Aug 6, 2020 at 6:13 PM Michael Carter > wrote: > > It would be useful if it could produce multi-line. > > Feel free to file a PR with test coverage in `workflow-cps-plugin`. I > would suggest a GUI checkbox since for more typical short commands the > line break would just be annoying, and there is no obvious cutoff past > which multiline is clearly better. > > (Also some plugins use `SnippetizerTester` to assert the Groovy > surface form of a given configuration, so behavioral changes would > force some test maintenance after updating the dep; not a big deal but > something to keep in mind.) > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/_AAQThp4IIc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > jenkinsci-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr12MAYQbvj6XR9Fb7Fxy%3DWDAOWKQUp6KdYJ-U0v_ctPRg%40mail.gmail.com > . > -- *G. Michael Carter* Contact: H: 1-647-277-1299 | M: 1-519-217-0441 Google Talk: xmpp:mikeycarter1...@gmail.com Instagram: mikey.carter Facebook: https://www.facebook.com/MikeyCarter1974 <http://livedvd.carterfamily.ca/> <http://www.openstreetmap.org/?lat=43.9216&lon=-80.105&zoom=14&layers=B000FTF> <http://www.openstreetmap.org/?lat=43.9216&lon=-80.105&zoom=14&layers=B000FTF> -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANjusZcMYotBEfokcg8sXqx6rATjjGujffaEBCDqowsO78cuBg%40mail.gmail.com.
Re: New Job/Project Type
Guess you could say what I'm investigating is to create is a few "secure" templates. That is create a job type where the "builder" and/or "publishers" are basically locked in and the people using them have only a few of the "freestyle" options. Partly on one server as a way to open up people having some control over their job without a free run on the system... other side of this is a "turn-key" solution for those who keep saying to me, "It's unreasonble for me to expect developers to know how to write scripts" That last one these people tend to get overwhelmed with too many options so want to limit the options to only the things they need to choose from. At the moment just fact finding to see what I can and can't do. When I noticed the Ivy/Maven templates had everything embedded with options turned off... I started looking at them as a template to make my own. On Thursday, August 6, 2020 at 6:54:24 PM UTC-4, Gavin Mogan wrote: > > I would take a look at FreeStyleProject. You'd need @Extension and some > templates at the very least. > > https://javadoc.jenkins.io/hudson/model/FreeStyleProject.html > > Maven project type is pretty much abandoned because of how integrated it > was with the java version your running jenkins with. > > But why would you want a new job type, does pipeline or multibranch > pipeline not work for you? > > On Thu, Aug 6, 2020 at 3:09 PM Michael Carter > wrote: > >> Was trying to reverse engineer the Ivy/Maven project to figure out how to >> create my own type of job. >> >> Is there a basic Hello World type template I could grab and expand off of? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkin...@googlegroups.com . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/0e8388c7-751f-4c23-96d8-21efcfabf428o%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/0e8388c7-751f-4c23-96d8-21efcfabf428o%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/33e8d7c0-9f19-4559-aab2-d9ce7d6fddd2o%40googlegroups.com.
Re: Snippet Generator: any way to manipulate the format the "generate" button creates?
It would be useful if it could produce multi-line. All of the developers I see use it always take the single line, of the more complex plugins, then break it into a multi-line for easy reading. reportIssues of the Next Generation Warning is a good example. Only one report tool it's small but after you start adding 10 or more tools with all the config it gets confusing and hard to read. On Thursday, August 6, 2020 at 1:05:52 PM UTC-4, Jesse Glick wrote: > > On Thu, Aug 6, 2020 at 8:54 AM Michael Carter > wrote: > > how I can hook a formatter into it? Is there custom hooks anywhere into > the "Generate" button? > > No, `workflow-cps` currently produces a single line only. I suppose it > could be made to generate indented multiline content if you checked a > box requesting that. What you _can_ do is ensure that default values > are omitted, so the size of the command is proportional to what the > user actually customized: > > > https://www.jenkins.io/doc/developer/plugin-development/pipeline-integration/#handling-default-values > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2490dd52-e425-43bc-991a-0e9c413c71d6o%40googlegroups.com.
New Job/Project Type
Was trying to reverse engineer the Ivy/Maven project to figure out how to create my own type of job. Is there a basic Hello World type template I could grab and expand off of? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0e8388c7-751f-4c23-96d8-21efcfabf428o%40googlegroups.com.
Snippet Generator: any way to manipulate the format the "generate" button creates?
I have a rather lengthy custom command I'm now writing, with ever growing nested items. (Good comparison to what I'm writing is the recordIssues command). The snippet Generator want's to all ways make it a single line eg: recordIssues aggregatingResults: true, enabledForFailure: true, filters: [ includeType('test')], qualityGates: [[threshold: 1, type: 'TOTAL', unstable: false], [threshold: 1, type: 'NEW_ERROR', unstable: false]], tools: [cpd(), checkStyle(), gendarme(pattern: '*.*')], trendChartType: 'TOOLS_ONLY' What I'd like it to do for my command is something like: recordIssues aggregatingResults: true, enabledForFailure: true, filters: [includeType('test')], qualityGates: [[threshold: 1, type: 'TOTAL', unstable: false ], [threshold: 1, type: 'NEW_ERROR', unstable: false ] ], tools: [cpd(), checkStyle(), gendarme(pattern: '*.*') ], trendChartType: 'TOOLS_ONLY' Anyone know a way to do this or how I can hook a formatter into it? Is there custom hooks anywhere into the "Generate" button? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/83f5d282-fcbc-41d6-af58-942672392126o%40googlegroups.com.
Credential Query Language (CQL) any docs or examples?
Does anyone have an example or documentation on the Credential Query Language (CQL)? I'm looking to filter credentials on the description field but I'm trying to figure out how or if I can do a fuzzy match. Nice if I could just do a regular expression type thing "ENV[A-D]" or of thing on the start of the description. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/62f32007-3d6c-4a97-9315-d38a2d14a967o%40googlegroups.com.
Re: Adding to project based security, and where to store data?
Managed to find my own answers. So posting here for completeness for anyone searching. Seems to add entries to the security area you just need these somewhere. import hudson.security.Permission; import hudson.security.PermissionGroup; import hudson.security.PermissionScope; import hudson.Extension; import jenkins.model.Jenkins; import org.jenkinsci.Symbol; @Extension @Symbol("myPermissions") public class MyPermissions { public static final PermissionGroup PERMISSION_GROUP = new PermissionGroup(MyPermissions.class, Messages._PermissionGroup_Title()); public static final Permission MANUAL_SYNC_PERMISSION = new Permission(PERMISSION_GROUP, "ManualSync", Messages._PermissionManualSync_Description(), Jenkins.ADMINISTER, PermissionScope.JENKINS); public static final Permission UPLOAD_MAP_PERMISSION = new Permission(PERMISSION_GROUP, "UploadMap", Messages._PermissionUploadMap_Description(), Jenkins.ADMINISTER, PermissionScope.JENKINS); } As for storing arbitrary data, this is doing my trick: https://plugins.jenkins.io/database-sqlite/ import org.jenkinsci.plugins.database.Database; import org.jenkinsci.plugins.database.GlobalDatabaseConfiguration; import org.jenkinsci.plugins.database.BasicDataSource2; import javax.sql.DataSource; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.PreparedStatement; import java.sql.Statement; import java.sql.SQLException; ... private GlobalDatabaseConfiguration globalDatabaseConfiguration; private Database database; private DataSource datasource; ... this.globalDatabaseConfiguration = GlobalDatabaseConfiguration.get(); this.database = this.globalDatabaseConfiguration.getDatabase(); this.datasource = this.database.getDataSource(); CreateTables(); On Saturday, July 25, 2020 at 11:18:49 AM UTC-4, Michael Carter wrote: > > Two questions this morning. > > Want to add my own options to the: > Project-based Matrix Authorization Strategy > > area of the Global Security Screen. Where do I find a clear example on > how to do that or the documentation? > > Also, I want to store data with Jenkins that's not tied to a job/build. > What's the best way to go about it or just bounce out to some DB? This is > rolling in a few ideas, but one is system test data. No point running the > deploy if all the target servers are offline or have problems. Basically > want to offer a screen in the admin area where someone could look to see if > anything in their path is offline. > > Thanks, > Michael > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e9188523-0d1e-48ca-af98-cd476e026a5co%40googlegroups.com.
Adding to project based security, and where to store data?
Two questions this morning. Want to add my own options to the: Project-based Matrix Authorization Strategy area of the Global Security Screen. Where do I find a clear example on how to do that or the documentation? Also, I want to store data with Jenkins that's not tied to a job/build. What's the best way to go about it or just bounce out to some DB? This is rolling in a few ideas, but one is system test data. No point running the deploy if all the target servers are offline or have problems. Basically want to offer a screen in the admin area where someone could look to see if anything in their path is offline. Thanks, Michael -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/91a00107-68d1-4b25-abcd-df63810a2fa0o%40googlegroups.com.
Re: How to create a run object outside of a job?
Kind ironic first answer was more helpful because it when it didn't work it forced me to look at the code behind findCredentialById and to this code: List candidates = new ArrayList<>( CredentialsProvider.lookupCredentials(MyCredentialsImpl. class, (Item)null, null, Collections.emptyList()) ); return Test(secretId, (MyCredentialsImpl)CredentialsMatchers.firstOrNull (candidates, CredentialsMatchers.withId(secretId))); And your answer was the cold water that I needed to use it. ;) Thanks for the help. On Thursday, July 23, 2020 at 9:39:44 AM UTC-4, Jesse Glick wrote: > > On Thu, Jul 23, 2020 at 8:51 AM Michael Carter > > wrote: > > StandardCredentials credResult = > CredentialsProvider.findCredentialById(secretId, > > > StandardCredentials.class, > > > run, > > > Collections.emptyList()); > > > > The run parameter can't be null. So how do I create a dummy run > > You cannot. You must not use that method. Find another. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8b123f81-c5c2-4a1f-8dee-4e42c3f2cae4o%40googlegroups.com.
How to create a run object outside of a job?
The situation in a nut shell. I've got a validation behind a button that calls a REST service to do the validation. So the validation is happening outside any running job. The only code I can find to lookup the password for the REST call is this one. StandardCredentials credResult = CredentialsProvider.findCredentialById( secretId, StandardCredentials.class, run, Collections.emptyList()); The run parameter can't be null. So how do I create a dummy run job inside a Jenkins Plugin. Or better yet create some type of run object that tells where it was running because I'd love to be able to track who's running the command against the credential. (side project in another place) -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/61b1eb70-c200-4e7a-9a58-7849c2ef74ado%40googlegroups.com.
Jenkins Plugin vs Pipeline Shared Libraries
Did my release of my new Jenkins Plugin on Wed and everything has been going as plan, at least from a technology standpoint, thanks for all the help... but we have a new employee that was hired recently who is suggesting, day of the release ironically, we scrap the newly developed plugin in favour of Pipeline Shared Libraries. I'm trying to verify some of the claims and rather than trying to find documents, which may not exist, figured I just save time ask the experts. The link I was provided to this next-generation tool to replace Jenkins Plugins interface (or at least that's the comment made in the meeting). https://www.jenkins.io/doc/book/pipeline/shared-libraries/ Mainly just need a Yes/No on these so I can keep or stop looking for how-to docs. Claims: - can pipeline shared libraries create UI interfaces so that rather than writing pipeline code our developers can just add UI selections to the pipeline job like Jenkins Plugin can for FreeStyle jobs? - can pipeline shared libraries include and access third-party Java SDKs jars? Similar to docker SDKs or cloud SDKs for example? Not using existing plugins but on top of these SDKs directly... SDK I'm using I can't share here, they're in house and I'm under an NDA, and no existing jenkins plugin exists. So sorry to be a bit vague. - Can pipeline shared libraries create new credentials types or new credential store providers, I'm dealing with an external password manager which I'm sync'ing up with jenkins? - Can shared libraries be run as background sync/bridge that runs as a task over running as a job/build? When I'm dealing with security scanners and such I went the direction of a plugin so it couldn't easily be tampered with but supposedly we can do this with shared libraries as well? - Can shared libraries add items/jelly files to snippet generator area? My understanding was you needed to include some @Library command but it's been suggested the snippet generator will build all that code for you so adding is just a cut/paste away. - Can shared libraries add global variables read from REST APIs to be available to FreeStyle jobs? We have some freestyle jobs that would need to make use of this Shared Library code.? I know global variables are accessible to pipeline but what about non-pipeline jobs/code? - Can shared libraries hook into pre/post job hooks? (like publisher, notifier, triggers) We have code, which developers often remove, that need to be run pre/post jobs. Plugin offers me that option. Trying to figure out where the shared libraries offer it. (again especially in FreeStyle jobs) The main line I hear, in multiple versions mainly by our report developers, is "it's unreasonable for me to expect developers to understand how to write scripts/pipeline code". (not that it was my decision to make them do anything ;) ... and I can't blame them... if you've been hired to develop reports in a UI reporting tool why do you need to learn pipeline/java/groovy to move your report CICD system) So the point with this plugin was to offer a turn-key solution or at the very least a "dropdown driven" option via the Snippet Generator, for them to cut and paste from. So if this pipeline shared libraries can reach this and other goals I'll concede to the new direction. When I initially investigated shared libraries it had gaps to what I needed, so mostly posting this to verify I'm not losing my mind :P -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/de1ccee1-2b55-449a-9c6a-c47bdb498f37o%40googlegroups.com.
Re: In jenkins test harness (only) node() {} commands crash the executor
So my ignorance might be showing but I think I tracked down where the 27.1-jre is coming from as if I do an exclude on jenkins-core:jar and pipeline-model-definition it goes away... well all versions of gauva go away. I'm guessing it's part of this? 2.235.1 bom-2.235.x io.jenkins.tools.bom ${jenkins.bom} ${jenkins.bomver} import pom On Wednesday, July 15, 2020 at 4:09:23 PM UTC-4, Michael Carter wrote: > > jenkins-core:jar appears to be the one... > > On Wednesday, July 15, 2020 at 3:00:23 PM UTC-4, Jesse Glick wrote: >> >> On Wed, Jul 15, 2020 at 2:09 PM Michael Carter >> wrote: >> > ... and that did the trick: >> > >> > >> > com.google.guava >> > guava >> > 11.0.1 >> > test >> > >> >> Not recommended. Better to find out which other dependency was pulling >> it a newer version of Guava and add an `` to suppress that. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ab24f231-539c-492c-9de7-df1a044d0d6bo%40googlegroups.com.
Re: In jenkins test harness (only) node() {} commands crash the executor
jenkins-core:jar appears to be the one... On Wednesday, July 15, 2020 at 3:00:23 PM UTC-4, Jesse Glick wrote: > > On Wed, Jul 15, 2020 at 2:09 PM Michael Carter > > wrote: > > ... and that did the trick: > > > > > > com.google.guava > > guava > > 11.0.1 > > test > > > > Not recommended. Better to find out which other dependency was pulling > it a newer version of Guava and add an `` to suppress that. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/af72e673-8f91-4f7b-9f7e-288f7bbec467o%40googlegroups.com.
Re: In jenkins test harness (only) node() {} commands crash the executor
... and that did the trick: com.google.guava guava 11.0.1 test Output: 62.511 [jobname-PipelineManualFailTest #1] [Pipeline] node 62.763 [jobname-PipelineManualFailTest #1] Running on Jenkins in workspace/jobname 62.964 [jobname-PipelineManualFailTest #1] [Pipeline] { 63.568 [jobname-PipelineManualFailTest #1] [Pipeline] stage 63.668 [jobname-PipelineManualFailTest #1] [Pipeline] { (Example Build) 64.121 [jobname-PipelineManualFailTest #1] [Pipeline] sh Guess that's what had me all turned around when I saw the guava jar coming from the jenkins-core I just assumed it was the correct one I should be using. Thanks for all the help everyone! On Wednesday, July 15, 2020 at 2:05:15 PM UTC-4, Michael Carter wrote: > > +- org.jenkins-ci.main:jenkins-core:jar:2.235.1:provided > | +- com.google.guava:guava:jar:27.1-jre:provided > > Guess that's my problem... somehow when I upgraded the pom.xml to pull the > 2.235.1/2.222.4 it must have broke then. > > At least this gives me a place to start looking. > > On Wednesday, July 15, 2020 at 1:42:56 PM UTC-4, Jesse Glick wrote: >> >> On Wed, Jul 15, 2020 at 9:17 AM Michael Carter >> wrote: >> > so it can pick up version 27.1-jre of guava from the war. >> >> From `jenkins.war`? As mentioned, that bundles 11, not 27. Keep >> editing `pom.xml` until >> >> $ mvn dependency:tree | fgrep guava >> [INFO] | +- com.google.guava:guava:jar:11.0.1:provided >> >> > problem is backtracking what I added from it last working is near >> impossible at this point. >> >> git bisect >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c2bc8121-ae41-404c-98f0-3c4f67171877o%40googlegroups.com.
Re: In jenkins test harness (only) node() {} commands crash the executor
+- org.jenkins-ci.main:jenkins-core:jar:2.235.1:provided | +- com.google.guava:guava:jar:27.1-jre:provided Guess that's my problem... somehow when I upgraded the pom.xml to pull the 2.235.1/2.222.4 it must have broke then. At least this gives me a place to start looking. On Wednesday, July 15, 2020 at 1:42:56 PM UTC-4, Jesse Glick wrote: > > On Wed, Jul 15, 2020 at 9:17 AM Michael Carter > > wrote: > > so it can pick up version 27.1-jre of guava from the war. > > From `jenkins.war`? As mentioned, that bundles 11, not 27. Keep > editing `pom.xml` until > > $ mvn dependency:tree | fgrep guava > [INFO] | +- com.google.guava:guava:jar:11.0.1:provided > > > problem is backtracking what I added from it last working is near > impossible at this point. > > git bisect > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a3f4739f-f9a1-40ed-bc5b-903a14c2beaao%40googlegroups.com.
Re: In jenkins test harness (only) node() {} commands crash the executor
Tried excluding the 27.1-jre version out of one of the apis I'm using so it can pick up version 27.1-jre of guava from the war. Didn't work. Tried adding directly: com.google.guava guava 27.1-jre test Didn't work either. I think the thread is crashing. Any way to turn on more debugging? Doing -X on maven doesn't put the jenkins harness into debug mode or anything. As for did the test stop working without code change. Not to that test but I as doing a lot of work in other areas before re-testing pipeline so probably something I did... problem is backtracking what I added from it last working is near impossible at this point. On Wednesday, July 15, 2020 at 8:13:55 AM UTC-4, Jesse Glick wrote: > > On Wed, Jul 15, 2020 at 7:42 AM Michael Carter > > wrote: > > java.lang.NoSuchMethodError: > com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; > > > > at > org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90) > > > > … > > > > Not sure what I did to cause the problem > > Somehow pulled in an incompatible version of `guava`. Jenkins bundles > 11.x, and without a lot of advanced acrobatics¹ you cannot override > this. If your plugin bundles some third-party libraries, they may be > depending on a newer version of Guava and Maven picks that version for > tests, breaking everything. Check > > mvn dependency:tree > > and use an `` as necessary. Unless the third-party library > actually _requires_ newer Guava features, in which case you have > problems. > > > Also, did your tests stop working with no code changes? If `master` > was blue/green until now, check whether your `Jenkinsfile` is using, > say, > > buildPlugin(configurations: recommendedConfigurations()) > > which is nondeterministic. If tests broke inside a PR (I would > recommend a PR for all nontrivial changes, even if you are a sole > maintainer, just for trackability and CI), link to that from any post > to the mailing list. > > > ¹Read: > https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/#pluginfirstclassloader-and-its-discontents > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/67873b52-020b-4d56-b3c7-17522c1a57b8o%40googlegroups.com.
In jenkins test harness (only) node() {} commands crash the executor
Last of the thorns in my side before I release this code internally today. All my tests via pipeline suddenly stopped working a week ago. One thing I did try was having a few minute pause at the beginning of this command so I could log in via the http console. Then tired creating the job via the UI and same results. As soon as the node part start it crashes the executor and all jobs just spin. Any echo commands and such on the job run fine. As long as there is no node() {} command Script running node() { echo "hello" } 44.247 [jobname-enableTest #1] [Pipeline] Start of Pipeline 47.466 [jobname-enableTest #1] [Pipeline] node 49.717 [id=47] SEVERE hudson.model.Executor#finish1: Executor threw an exception java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors .sameThreadExecutor()Lcom/google/common/util/concurrent/ ListeningExecutorService; at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback( Futures.java:90) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.runInCpsVmThread( CpsFlowExecution.java:900) at org.jenkinsci.plugins.workflow.cps.CpsBodyInvoker.start(CpsBodyInvoker. java:153) at org.jenkinsci.plugins.workflow.cps.CpsBodyInvoker.start(CpsBodyInvoker. java:56) at org.jenkinsci.plugins.workflow.support.steps. ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable.run( ExecutorStepExecution.java:844) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Not sure what I did to cause the problem but I'm sure this is just some library I'm missing as it seems to be the root of all my issues so far. Just not sure where to look or where to start. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/3ac8d5d6-bf08-40d5-ad44-8dceeca1eaa3o%40googlegroups.com.
Re: How to get rid of space in temp folder of jenkinsRule?
I found it... I was barking up the wrong tree. Added this to my pom.xml and everything started working. Thanks for the help... sometimes I just need to explain things to someone else to find the problem ;) org.jacoco org.jacoco.report 0.8.5 test On Tuesday, July 14, 2020 at 4:45:38 PM UTC-4, Jesse Glick wrote: > > On Tue, Jul 14, 2020 at 4:24 PM Michael Carter > > wrote: > > If I run outside the testing harness everything works fine. > > Unless, presumably, a hapless user tries to use your plugin with a > path that contains spaces. That is the point of including the space in > the test harness: to remind you to fix this. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9fdbcc0d-8a5b-40da-b816-3beebbdb4a7co%40googlegroups.com.
Re: How to get rid of space in temp folder of jenkinsRule?
xecute(Run.java:1905) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) If I run outside the testing harness everything works fine. On Tuesday, July 14, 2020 at 4:09:28 PM UTC-4, Gavin Mogan wrote: > > Why would anything not shell related have problems with spaces in the file > paths? Can you just update the code reading it? > > I don't know how to remove the space, though honestly I don't think i've > ever seen a space in the path but i've never looked carefully sorry. > > Gavin > > On Tue, Jul 14, 2020 at 1:02 PM Michael Carter > wrote: > >> Doing some research into this it suggested objects with spaces can cause >> this error. The only space I could find is in the temp folder name. Any >> way to get rid of that space? >> >> Caused: java.io.IOException: While reading class directory: /my-plugin/ >> target/tmp/j h1438579319153760688/jobs/jobname-FreeStyleJacocoOnlyTest/ >> builds/1/jacoco/classes >> at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure( >> ExecutionFileLoader.java:132) >> at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage( >> ExecutionFileLoader.java:140) >> at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110) >> at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction. >> java:331) >> at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java: >> 321) >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkin...@googlegroups.com . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/f7f89dc7-6113-481f-ab61-b18f9dfb2887o%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/f7f89dc7-6113-481f-ab61-b18f9dfb2887o%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/fb58bf12-d996-4a4c-9113-03a517eae8e7o%40googlegroups.com.
How to get rid of space in temp folder of jenkinsRule?
Doing some research into this it suggested objects with spaces can cause this error. The only space I could find is in the temp folder name. Any way to get rid of that space? Caused: java.io.IOException: While reading class directory: /my-plugin/ target/tmp/j h1438579319153760688/jobs/jobname-FreeStyleJacocoOnlyTest/ builds/1/jacoco/classes at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure( ExecutionFileLoader.java:132) at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage( ExecutionFileLoader.java:140) at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110) at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction. java:331) at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:321) -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f7f89dc7-6113-481f-ab61-b18f9dfb2887o%40googlegroups.com.
How to override the plugin version seen by plugin manager area
Hopefully a quick question with a quick answer. I have this in my pom.xml to override the file name: ${project.artifactId}-${project.version}-${timestamp} How do I get the ${timestamp} added to the version that the plugin manager sees? I'm assuming it's the Implementation-Version and/or Plugin-Version in the MANIFEST.MF but can't seem to figure out how to manipulate it in the pom.xml Thanks, Michael -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/24a5e7be-7021-4007-8c60-60f8920d4c97o%40googlegroups.com.
java.lang.Object in new pipeline command causing snippetizer to fall over, is there an annotation?
Caused by: java.lang.IllegalArgumentException: Unable to convert to class java.lang.Object at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON (RequestImpl.java:738) Caused by: java.lang.Error: Failed to instantiate class io.jenkins.plugins. at hudson.model.Descriptor.newInstance (Descriptor.java:606) at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet (Snippetizer.java:502) at java.lang.invoke.MethodHandle.invokeWithArguments (MethodHandle.java:627) So basically I have an java.lang.Object field and snippetizer falls over on the "generate command" Is there an annotation or something to say tell snippetizer to use this Object as a string? As the generator command will be a String but in script it could be a Json object or other things. Bottom line is I wanted to have a single input field that could be mutiple types. ... and if anyone asks no I can't share the source. It's part of an inhouse plugin and it's not something I'm allowed to share. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/700c59d8-b081-4e38-95e3-7e2a27eea789o%40googlegroups.com.