Simulate offline builds with GitLabRunner

Is there an option in GitLab CI to simulate offline builds? We have all our sources in internal Repos. A important thing is to build everything without Internetconnection. Is there a command to tell the runner do not connect to the Internet.

Hi,

I would register a dedicated runner for this group/project and then lock it down with custom firewall rules for this simulation. Not beautiful, but the first idea I just had.

You could also deploy/instrument these rules via a previous job run, and Ansible - if that is not too complex to deploy.

Not sure if such a “killswitch” could be implemented, but opening a feature request to discuss further might also be an idea for future scenarios.

Cheers,
Michael

With the firewall is not nice. But maybe workaround for beginning

Ok it works with iptables. And with iptables it is possible to drop the packets