Re: Feedback for local maven workflow in Jenkins Plugin Dev
Just to clarify what you are suggesting: 1) Run `mvn install` on the first plugin to install it in my local maven repository. 2) Then depend on the first plugin directly in the pom.xml of my second plugin as maven resolves it from local maven repository. Yeah this works but.. Unfortunately, in my case I had modified maven's settings.xml - https://gist.github.com/baymac/de891c463ccc5316fce475ef87025d19 Maven checks the upstream jenkins repository (repo.jenkins-ci.org) for dependencies even for my local dependency and of course it isn't found there which gives an error. Although I am not really sure if that is the case because I face this error sometimes and unable to reproduce it again. As of now it works without removing the maven settings. Regards, Parichay (baymac) On Tuesday, April 16, 2019 at 7:58:32 AM UTC+5:30, Jesse Glick wrote: > > On Mon, Apr 15, 2019 at 10:13 PM Parichay Barpanda > > wrote: > > I ran the following command (the additional params for groupid, > artifactid, version are optional).: > > > > mvn install:install-file > -Dfile=/home/parichay/gsoc/gitlab-plugin/lib/gitlab-api.jar > -DgroupId=io.jenkins.plugins -DartifactId=gitlab-api -Dversion=1.0-SNAPSHOT > > No, just run > > mvn install > > as I said before. No parameters. > -- 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/b85e3d06-1d55-41c0-ae8d-1c66714f468f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Feedback for local maven workflow in Jenkins Plugin Dev
On Mon, Apr 15, 2019 at 10:13 PM Parichay Barpanda wrote: > I ran the following command (the additional params for groupid, artifactid, > version are optional).: > > mvn install:install-file > -Dfile=/home/parichay/gsoc/gitlab-plugin/lib/gitlab-api.jar > -DgroupId=io.jenkins.plugins -DartifactId=gitlab-api -Dversion=1.0-SNAPSHOT No, just run mvn install as I said before. No parameters. -- 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/CANfRfr1yOxEBxUJ-LcfaBo7Mc2BAccoRq4SVEnE9r4PEdO4%2BOA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Feedback for local maven workflow in Jenkins Plugin Dev
On Mon, Apr 15, 2019 at 9:23 PM Parichay Barpanda wrote: > Installing the plugin using the command as you have suggested is simple > enough but I couldn't make it work that way. It compiled successfully but I > was unable to import dependencies classes. Can you be more specific? This is just normal Maven development workflow, not specific to Jenkins. > I tried another method using the maven install plugin. What I did there can > be found here - > https://gist.github.com/baymac/6e822204da2c175d10933aedb893dd2a Delete the `maven-install-plugin` configuration. You do not need it. What you _do_ need is the standard Jenkins plugin parent POM. https://jenkins.io/doc/developer/tutorial/ > I will read your JEP when I have some time. Do not bother, it is not likely to be useful in your situation. -- 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/CANfRfr1fP3ZOeftHwf_ddOwrYdT0Bkdv3aPwqKatw2zpBTreXA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Feedback for local maven workflow in Jenkins Plugin Dev
Hi jesse, Thanks for replying. Both are private plugins. Installing the plugin using the command as you have suggested is simple enough but I couldn't make it work that way. It compiled successfully but I was unable to import dependencies classes. I tried another method using the *maven install plugin*. What I did there can be found here - https://gist.github.com/baymac/6e822204da2c175d10933aedb893dd2a There was the same problem as installing the plugin from commandlline. I am confused if "installing the plugin" mean "installing the jar package generated inside the */target* directory of the first plugin"? I will read your JEP when I have some time. Regards, Parichay (baymac) On Mon 15 Apr, 2019, 18:39 Jesse Glick On Sun, Apr 14, 2019 at 9:16 PM Parichay Barpanda > wrote: > > I was working on 2 different plugins. > > Private plugins, or hosted in @jenkinsci? > > > The second plugin needed a way to depend on the first plugin. There were > multiple ways it could be done like: > > This is quite routine for plugins hosted in the normal way. You do not > need to do anything special beyond declare the ``. You can > even have dependencies on unreleased changes via JEP-305. > > > ii) Installing the jar in the local maven but for me it was a complex > setup > > $ mvn -f first-plugin install > > is a complex setup? > > -- > 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/CANfRfr2gM1b2HAo8aBpvaYd2OQA6ertuz5sLzesqwQx7dNmQ8w%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAD0DWAPyb3XO9KLV3jf5gvHe-XSDVV9edAmhUJ446Kv91B3a9Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Is Jenkins logger buffered? If so is there any way to "flush" it?
On Mon, Apr 15, 2019 at 10:41 AM Daniel Anechitoaie wrote: > 3) When build fails. Here I would need to get the output of the stage the > failed to be able to send that to GitHub. I guess you could capture the stage output, but this could in general be massive. Do you really need to send it to GitHub? JENKINS-28119 might be a better approach: just send GitHub a link back to Jenkins. > For #3 I did as you suggested from @Ullrich link as a block scoped function > which seems perfect. You could call `StepContext.saveState` to ensure that all output is recorded even if Jenkins is restarted in the middle of the stage. Other than that, I think it would work, other than the scalability problem. -- 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/CANfRfr0LAmvsjJ%2BdKBxLyh5zT0D2xy_7ggXjabpyTUWpk04kTA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Is Jenkins logger buffered? If so is there any way to "flush" it?
What I'm trying to do is integrate with GitHib Checks API so I need to be able to post three types of events to GitHub. 1) When build started (which I did as a pipeline step plugin - gitHubCheckRunBegin()) 2) When build was successful (which I did as a pipeline step plugin - gitHubCheckRunEnd()) 3) When build fails. Here I would need to get the output of the stage the failed to be able to send that to GitHub. For #3 I did as you suggested from @Ullrich link as a block scoped function which seems perfect. Basically what I have now is https://gist.github.com/danechitoaie/bdde3c4735914e3b830e0e481211c4a9 Dos it make sense? Is it ok the way it was done? And I'm planing to use this like: node { def cfg = [ 'stuff': 'stuff', ... ] stage('Cleanup') { cleanWs() } stage('Git') { git(...) } stage('CheckRun_Begin') { gitHubCheckRunBegin(cfg) } stage('Yarn') { withGitHubCheckRun(cfg) { sh(...) } } stage('Build') { withGitHubCheckRun(cfg) { sh(...) } } stage('CheckRun_End') { gitHubCheckRunEnd(cfg) } } So at start gitHubCheckRunBegin makes call to GitHub api to start the check, gitHubCheckRunEnd will make call to GitHub api to end the check successfully (assuming the job gets there). And if any step fails then the withGitHubCheckRun will catch that stage output and push it the GitHub API On Monday, April 15, 2019 at 4:07:07 PM UTC+3, Jesse Glick wrote: > > On Sat, Apr 13, 2019 at 3:27 PM Daniel Anechitoaie > > wrote: > > } catch (e) { > > myPlugin() > > throw e > > } > > Not really sure what you are trying to accomplish here, but this does > not smell like a good idea. > -- 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/cad3e883-40f1-4235-b480-d2a38f6899ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Getting Launcher instance in Descriptor of builder
On Mon, Apr 15, 2019 at 5:38 AM Nikhil Bhoski wrote: > do any one know how can i get the Launcher instance or Virtual channel > instance of Remote slave in Descriptor of Builder . No, this is not possible. How would you know in advance what agent is going to perform any build? It could change from build to build, and the agent might not even exist yet. -- 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/CANfRfr1sm9cEzRwDM8cNnWjdhyuBu%3Dcw0yReCa0wzrE2OdhCew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Feedback for local maven workflow in Jenkins Plugin Dev
On Sun, Apr 14, 2019 at 9:16 PM Parichay Barpanda wrote: > I was working on 2 different plugins. Private plugins, or hosted in @jenkinsci? > The second plugin needed a way to depend on the first plugin. There were > multiple ways it could be done like: This is quite routine for plugins hosted in the normal way. You do not need to do anything special beyond declare the ``. You can even have dependencies on unreleased changes via JEP-305. > ii) Installing the jar in the local maven but for me it was a complex setup $ mvn -f first-plugin install is a complex setup? -- 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/CANfRfr2gM1b2HAo8aBpvaYd2OQA6ertuz5sLzesqwQx7dNmQ8w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Is Jenkins logger buffered? If so is there any way to "flush" it?
On Sat, Apr 13, 2019 at 3:27 PM Daniel Anechitoaie wrote: > } catch (e) { > myPlugin() > throw e > } Not really sure what you are trying to accomplish here, but this does not smell like a good idea. -- 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/CANfRfr0AC6d_qq-jE%3DXnZQOx%3DpmC3u5Bm42c9-2x%3DmLbSFpQKQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Backporting for LTS 2.164.3 started
Backporting has started and the RC is scheduled for 2019-04-24. Candidates: https://issues.jenkins-ci.org/issues/?filter=12146 Fixed: https://issues.jenkins-ci.org/issues/?jql=labels%20%3D%202.164.3-fixed Rejected: https://issues.jenkins-ci.org/issues/?jql=labels%20%3D%202.164.3-rejected -- oliver -- 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/845a8da6-c20e-1f50-e69e-319fe283b1f7%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Getting Launcher instance in Descriptor of builder
I am trying to verify if the given path is valid on the system. User in put is String value . i do check this by invoking docheck methods in builder descriptor. However i cant use Jenkins.getInstance().getChannel() as it returns null is i am checking the path on remote slave . do any one know how can i get the Launcher instance or Virtual channel instance of Remote slave in Descriptor of Builder . -- 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/969d7a09-6ce0-4519-945e-17042dd2f418%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.