How to integrate git plugin in my plugin?

26 views
Skip to first unread message

tzach....@gmail.com

unread,
Nov 15, 2023, 10:14:12 AM11/15/23
to Jenkins Developers
Hi,

I have a private that needs configuration.
That configuration is stored in a remote git repository.
I would like to harness git plugin and use it in my plugin.
Is there an example of how to do it?

Thanks,
Tzach

Jeff Pearce

unread,
Nov 15, 2023, 11:01:39 AM11/15/23
to jenkin...@googlegroups.com
Have you looked at the source for the Github Branch Source plugin? I imagine it has examples of how to do many things.

From your description though, it sounds like you might be able to store your configuration in Jenkins itself? Maybe as a secret? That said, I have to admit I don't 100% understand your scenario.

Best
Jeff

--
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/33209811-581c-434c-836f-6461e509d636n%40googlegroups.com.

tzach....@gmail.com

unread,
Nov 15, 2023, 11:31:02 AM11/15/23
to Jenkins Developers
My scenario is that i have a JSON file located in a remote repo.
In that file there is a configuration I need for the plugin.

I want to be able to pull that file and read it in my plugin.
The reason for it being in the remote repo as it serves also other applications and not just my plugin.

Is it doable?

Thanks,
Tzach

Jeff Pearce

unread,
Nov 15, 2023, 12:07:10 PM11/15/23
to jenkin...@googlegroups.com
It’s probably doable, but it founds like a file secret could serve your purpose. It would be readable from any job in Jenkins as well as your plugin 

Sent from my iPhone

On Nov 15, 2023, at 8:31 AM, tzach....@gmail.com <tzach....@gmail.com> wrote:

My scenario is that i have a JSON file located in a remote repo.
Reply all
Reply to author
Forward
0 new messages