Jenkins plug-in

18 views
Skip to first unread message

Petra Halouzkova

unread,
Oct 20, 2021, 8:39:04 AM10/20/21
to jenkin...@googlegroups.com
Hello, 
I need a little help, i m new in writting jenkins plug-in but i my job i write plug-in which shoul collect commits from repo between two release version and send them to jira.
My plug-in works fine when build run on master but fail when it run on agent. I guess it is because  
during build i m checking workspace and in calling git command (from buildprocessor) but on agent i cant find workspace with checkout direrectory. 
How can i fix that?
Thanks
Petra

Jim Klimov

unread,
Oct 20, 2021, 10:54:15 AM10/20/21
to Petra Halouzkova, jenkin...@googlegroups.com
As a shot in the dark: are you running the git command as a system process, or wrapped via Git Client Plugin? The wraps should include a proxy mode to effectively tell the agent to run stuff and return results, and AFAIK this should be transparent to plugin authors and users (probably depends on node context, workspace path, etc. behind the scenes).

Jim
--
Typos courtesy of K-9 Mail on my Android

Ullrich Hafner

unread,
Oct 20, 2021, 11:03:02 AM10/20/21
to JenkinsCI Developers
As Jim already mentioned, you should use the Git Client Plugin to access the Git repositories. If you need an example on how to use that you can look into the tests of the Git Client Plugin (https://plugins.jenkins.io/git-client/) or into the implementation of the Git Forensics Plugin (https://github.com/jenkinsci/git-forensics-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-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/B06C45F0-58E5-4CD3-B9C5-B7E8D495D118%40cos.ru.

Björn Pedersen

unread,
Oct 21, 2021, 3:26:30 AM10/21/21
to Jenkins Developers
ullrich...@gmail.com schrieb am Mittwoch, 20. Oktober 2021 um 17:03:02 UTC+2:
As Jim already mentioned, you should use the Git Client Plugin to access the Git repositories. If you need an example on how to use that you can look into the tests of the Git Client Plugin (https://plugins.jenkins.io/git-client/) or into the implementation of the Git Forensics Plugin (https://github.com/jenkinsci/git-forensics-plugin).



And maybe also check the git-changelog plugin (https://plugins.jenkins.io/git-changelog/).

 
Reply all
Reply to author
Forward
0 new messages