Steps to Call Python method in BuildBot

+5 votes

I'm trying to implement the build process from master.cfg in BuildBot

I created common utility python packages which can be used while build-process,

So while adding steps in util.BuildFactory() I want to execute the python methods from my custom build-package.

I refereed the Adding customized functions to Buildbot.

I imported my custom package into master.cfg in buildbot, but still can not call this method directly with factory.addStep.

I tried another alternative, created a python script, import the custom-build utility package, and then run this script with steps.ShellCommand (command = ['python', 'myScript.py'])

But there will be additional script maintains for particular build process and I can't reuse that script.

Can anyone show me how to call python method from build process of buildbot.

Mar 27, 2018 in DevOps & Agile by shubham
• 7,340 points
1,626 views

3 answers to this question.

+1 vote

To run python code, you must write a  custom build step, a class inherited from BuildStep with a code in the run () method. Note that this code will be run in the master (as well as ShellCommand questions). To run the slave code, you must use RemoteShellCommand. See the documents for details.

answered Mar 27, 2018 by ajs3033
• 7,300 points

edited Oct 12, 2018 by Kalgi
0 votes

BuildSteps are usually specified in the buildmaster’s configuration file, in a list that goes into the BuildFactory. The BuildStep instances in this list are used as templates to construct new independent copies for each build (so that state can be kept on the BuildStep in one build without affecting a later build).

For detailed explaination have a look at this blog.

answered Oct 12, 2018 by Hannah
• 18,540 points
0 votes
I was also facing same issue how to call python file from buildbot. Following link where I have shared the commands to install buildbot as well as whole master.cfg file

Link: https://stackoverflow.com/questions/48986330/calling-python-method-in-buildbot-build-steps
answered Jun 11, 2019 by Viraj
• 140 points

Related Questions In DevOps & Agile

+1 vote
2 answers

is it possible to assign a Feature/User Story/Task to a team [Group] in VSTS

In most cases, we would break Work ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
5,352 views
0 votes
1 answer

Want to get active connections in LDAP in command prompt

You can track the active connections which ...READ MORE

answered Apr 3, 2018 in DevOps & Agile by shubham
• 7,340 points

edited Apr 3, 2018 by shubham 855 views
+13 votes
2 answers
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,770 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,920 views
+3 votes
1 answer

Unable to find the TargetArguments path While configuring dot cover in VSTS

For your unable to find the TargetArguments ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by ajs3033
• 7,300 points
1,090 views
0 votes
1 answer

How to simplify or automate task group creation in TFS?

You can easily import or export task ...READ MORE

answered Apr 25, 2018 in DevOps & Agile by ajs3033
• 7,300 points
1,850 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP