Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Compute Engine

Hello,

I need to run a software build triggered by a github action that takes ~1 hour to build. It first launches a dev docker container, builds code in the docker container, copies the build out of the container and then builds a new container with the output.

I have a setup right now that will launch a google compute engine in a github action, ssh into the vm and run commands to accomplish said tasks. However, it keeps timing out before the build completes.

I have been looking into using google workflows to accomplish this as well but can't seem to find a strategy that doesn't end up using ssh anyway.

 

Does anyone know of a way to accomplish a long running task inside of a compute engine? Preferably this would also have outputs from commands for debugging.

Thanks!

1 1 145
1 REPLY 1

Hello @ThomasGira,

Welcome to Google Cloud Community!

You can start a background process or a daemon inside the Compute Engine instance.

This can be achieved by executing a script or command in the background that performs the long-running task. You can use tools like nohup or screen to run a command in the background even after you disconnect from the instance. This approach allows the task to continue running even if you are not actively connected to the instance.

For the time-out you keep on getting before the build completes, it would be great if you will be a bit specific or post the exact error message of the issue that you are encountering. We are delighted to try and help.

Thanks!