Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,324
Community Members
 
Community Events
184
Community Groups

Bamboo Plan automatically run Python program

Edited

I have plan with two task.

One is check-out source code from Git-hub and second task is to run the python program using script.

 

Check out from the Git is working fine.

For run the python script I given like the below code using 'script task'

C:\Users\username\AppData\Local\Programs\Python\Python37-32\python C:\Users\userna\bamboo-home\xml-data\build-dir\GP-GIT-GIT\AppName\app.py

 

I want to run the entire plan once I commit the code to git-hub. I have configured my project as per the Bamboo-documentation 

and it is working only when the plan is stopped( ie, Only when all plans are stopped and commit the code in git, it is automatically check-out the source code running the python file.)

In the git repository folder couldn't find the '.git/hooks/post-receive' , 'post-receive' file.

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 17, 2019

Hi @Vineesh,

I'm not sure if I understood your problem.

Can you explain better this part?

(...) it is working only when the plan is stopped( ie, Only when all plans are stopped and commit the code in git, it is automatically check-out the source code running the python file.)

I guess you are following the configuration for git from Repository triggers the build when changes are committed and that is not the same thing you should do for GitHub. There are two ways to configure a repository for GitHub:

Repository polling

Just add the repository polling trigger and Bamboo will check the GitHub repository for changes with the configured interval.

Webhooks

In this case, the GitHub will be the one triggering a Bamboo build. For that we need:

  1. The Bamboo instance should be reachable through the internet.
  2. Bamboo needs to have a remote trigger configured in the plan you want GitHub to trigger.
  3. Add the list of addresses that can trigger builds in Bamboo. You should include both your proxy address and the IPs from webhook of GitHub (you can find a reference to them in this page: About GitHub's IP addresses - GitHub Help)
  4. Make sure the anonymous user can trigger builds:
    Admin >> Security settings>> [x] Allow anonymous users to trigger remote repository change detection and Bamboo Specs detection
  5. GitHub needs to be configured to call the following Bamboo REST API:
    https://<BAMBOO_URL>/rest/triggers/latest/remote/changeDetection?planKey=<PLAN-KEY>

Those options should allow you to run builds in Bamboo from GitHub commit updates.

Please let me know your findings.

@Daniel:  How do I configure the Bamboo REST API in GitHub?

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 17, 2019

In my test I just configured the Repository settings >> Webhooks >> Payload URL field with the URL above, of course, with the right plan and server address.
You need to be admin of the GitHub repository for that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events