How to access Jenkins server using Python Or JenkinsApi for Windows

64 views
Skip to first unread message

Sujith Cherukuri

unread,
Feb 27, 2017, 5:08:59 AM2/27/17
to Jenkins Users
Hello,

My build server is based on Windows. I want to trigger a Build using pythons scripts. As of now from http://pythonhosted.org/jenkinsapi/, it seems that, api only for Linux System.

Thanks and Regards,
Sujith

Eric Pyle

unread,
Feb 27, 2017, 9:36:49 AM2/27/17
to jenkins...@googlegroups.com
I use Jenkinsapi for both Linux and Windows with no problem. You just need to install Jenkinsapi module in the Python installation used by each build machine, e.g. by "pip install jenkinsapi". Then in a shell or batch script build step, you call a Python script and "import jenkinsapi" in the script.

Eric
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8d4a4967-b410-4c2f-bda9-f4f97a775e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060 (T)
+1 603-359-8670 (M)
eric...@siemens.com
http://www.siemens.com/plm

Sujith Cherukuri

unread,
Feb 28, 2017, 12:38:49 AM2/28/17
to Jenkins Users
Hello Eric,

Thanks for your reply, could you please let me know, how to install Jenkinsapi for Windows. I am not able to find any documentation for that.

Thanks and Regards,
Sujith
--

Eric Pyle

unread,
Feb 28, 2017, 9:27:33 AM2/28/17
to jenkins...@googlegroups.com
It's the same on Windows or Linux. If you look in your Python scripts directory, usually something like C:\Python35\scripts (for Python 3.5), you should find package install tools like pip or easy_install. You may need to give the full path to the executable, so "C:\Python35\scripts\pip install jenkinsapi". If pip is not installed you can use easy_install.

Eric

For more options, visit https://groups.google.com/d/optout.

--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060 (T)
+1 603-359-8670 (M)

Indra Gunawan (ingunawa)

unread,
Mar 1, 2017, 12:33:02 PM3/1/17
to jenkins...@googlegroups.com

HI Sujith,

 

Are you proficient in Python?  At the very least you know how to install python module the easy way using pip install right?

Reply all
Reply to author
Forward
0 new messages