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,459,274
Community Members
 
Community Events
176
Community Groups

How can i wait for a bitbucket runner to get online?

Edited

Hallo community,

I am currently facing the problem not being able to determine when the bitbucket runner comes online.

 

My situation:

    I am connecting to Azure in order to start a VM there. (Windows 10)

    On this VM i have executed the necessary scripts to connect the runner with Bitbucket.

    On bitbucket i have created a windows repository runner.

    When i start my pipeline everything works out of the box, but sometimes my pipeline            fails because the runner is not online at this moment.

 

My problem:

    The unconsistency for the runner to come online makes it hard to time the steps properly. It takes between 120 - 500 sec.

 

Main Question:

    Is it possible to directly wait for the runner to come online, or do i have to increase the delay time to such a high amount just to be sure?

    This would be around 500 seconds just to be sure?! 

 

I hope that I am not the only one facing this issue and would be glad to get some respones.

 

1 answer

1 accepted

0 votes
Answer accepted

Hi Dominik,

The runner needs to be online when a build gets triggered, it is not possible to wait for the runner to come online.

You mentioned that the runner takes 120 - 500 sec to come online. Are you executing the preconfigured command to start the runner manually? And does it take 120 - 500 sec from the moment you execute the command until you see the runner as online?

Do you trigger the build manually, or do you have a script that triggers the pipelines build? I'm trying to understand what you mean by increasing the delay time; are you starting the runner and then triggering a pipelines build from the same script?

Kind regards,
Theodora

Hallo Theodora, 

I have to admit that something happend that i wasn't expecting.....

The VM to that my runner should connect decided to deactivate autologin (Maybe cause of an update it got disabled)

and therefore the runner script wasn't executed until I connected via rdp to the machine. I will keep that in mind for the future!!!

 

STEP 1:

I am starting the VM over a Bitbucket pipeline as a seperate step. 

The runnerscript gets triggered after the VM started and logged in.

 

 

After this step1 and after the runner has hopefully properly connected I call the script i want to execute over the pipeline in a seperate step.

 

STEP 2:

   C:\<Path to my script>

 

After i enabled autologin on Windows again, everything works. 

But if someone wants to share a better solution then I am always glad for some hints

 

Best,

Dominik 

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events