The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Dominik Bregovic
December 8, 2022

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2022

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

Dominik Bregovic
January 11, 2023

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
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events