• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Hey team,

      We have received reports that users would like to see Bitbucket Pipelines Windows Runners support running as a service on the OS.
      This is a feature already implemented in a number of softwares and would be a useful addition in terms of guaranteeing a more stable uptime for the agent/runner:
      gitlab https://docs.gitlab.com/runner/install/windows.html
      github or bamboo https://mamcer.github.io/2016-12-20-bamboo-windows-agent-installation/
      jenkins https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+as+a+Windows+service

      Thanks,
      Ben

            [BCLOUD-21928] Support Pipelines Windows Runners as a service

            Jake Bloomfield added a comment -

            Any update on this? It's been 3 years without an update. Appreciate there is a valid work around, but this should be a standard option for runners as all other players use it.

            Jake Bloomfield added a comment - Any update on this? It's been 3 years without an update. Appreciate there is a valid work around, but this should be a standard option for runners as all other players use it.

            Krzysztof Skiba added a comment - - edited

            Agree, I created workaround for it:

            What we need:

            • WinSW - Download to runner folder & rename WinSW.exe to runner.exe
            • Configuration file - Save content of XML file as runner.xml

             

            <service>
              <id>BitbucketRunnerWrapper</id>
              <name>Bitbucket Runner Wrapper (powered by WinSW)</name>
              <description>Wrapper for JAVA based Bitbucket Runner</description>
              <executable>java</executable>
              <arguments>-jar -Dbitbucket.pipelines.runner.account.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.repository.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.environment=PRODUCTION -Dbitbucket.pipelines.runner.oauth.client.id=xxxxxxxxxxxxxx -Dbitbucket.pipelines.runner.oauth.client.secret=xxxxxxxxxxxxxxx -Dbitbucket.pipelines.runner.directory.working=..\temp -Dbitbucket.pipelines.runner.runtime=windows-powershell -Dbitbucket.pipelines.runner.scheduled.state.update.initial.delay.seconds=0 -Dbitbucket.pipelines.runner.scheduled.state.update.period.seconds=30 -Dbitbucket.pipelines.runner.cleanup.previous.folders=false -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 ./bin/runner.jar</arguments>
              <log mode="roll"></log>
              <logpath>%BASE%\logs</logpath>
              <stopparentprocessfirst>true</stopparentprocessfirst>
            </service> 
            • Setup variables:

            Dbitbucket.pipelines.runner.account.uuid

            Dbitbucket.pipelines.runner.repository.uuid

            Dbitbucket.pipelines.runner.uuid

            Dbitbucket.pipelines.runner.oauth.client.id

            Dbitbucket.pipelines.runner.oauth.client.secret

            • Run command
            .\runner.exe install runner.xml
            • Go to services and Start the service. Make sure that it runs on proper user.

             

            Krzysztof Skiba added a comment - - edited Agree, I created workaround for it: What we need: WinSW - Download to runner folder & rename WinSW.exe to runner.exe Configuration file - Save content of XML file as runner.xml   <service>   <id>BitbucketRunnerWrapper</id>   <name>Bitbucket Runner Wrapper (powered by WinSW)</name>   <description>Wrapper for JAVA based Bitbucket Runner</description>   <executable>java</executable>   <arguments>-jar -Dbitbucket.pipelines.runner.account.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.repository.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.uuid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx} -Dbitbucket.pipelines.runner.environment=PRODUCTION -Dbitbucket.pipelines.runner.oauth.client.id=xxxxxxxxxxxxxx -Dbitbucket.pipelines.runner.oauth.client.secret=xxxxxxxxxxxxxxx -Dbitbucket.pipelines.runner.directory.working=..\temp -Dbitbucket.pipelines.runner.runtime=windows-powershell -Dbitbucket.pipelines.runner.scheduled.state.update.initial.delay.seconds=0 -Dbitbucket.pipelines.runner.scheduled.state.update.period.seconds=30 -Dbitbucket.pipelines.runner.cleanup.previous.folders= false -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 ./bin/runner.jar</arguments>   <log mode= "roll" ></log>   <logpath>%BASE%\logs</logpath>   <stopparentprocessfirst> true </stopparentprocessfirst> </service> Setup variables: Dbitbucket.pipelines.runner.account.uuid Dbitbucket.pipelines.runner.repository.uuid Dbitbucket.pipelines.runner.uuid Dbitbucket.pipelines.runner.oauth.client.id Dbitbucket.pipelines.runner.oauth.client.secret Run command .\runner.exe install runner.xml Go to services and Start the service. Make sure that it runs on proper user.  

            This is a super important feature to add for Windows Runner support. Without it, our automation is not really automation, since someone needs to log in every time the server has been rebooted (which happens at least once a month for security patches). Please prioritize this feature!

            Phil Brandvold added a comment - This is a super important feature to add for Windows Runner support. Without it, our automation is not really automation, since someone needs to log in every time the server has been rebooted (which happens at least once a month for security patches). Please prioritize this feature!

              Unassigned Unassigned
              57b7f67f3625 Ben
              Votes:
              68 Vote for this issue
              Watchers:
              36 Start watching this issue

                Created:
                Updated: