3

We need to set up a CI server using mac.

We set up our private gitlab server on the cloud and gitlab-runner on a mac at the office. When the mac does not go to sleep it works well. But when it goes to sleep the runner won’t wake.

I already set “wake for network access” but it does not work. The pipeline job won’t run when the mac goes to sleep. I further test that if I use Fing on my iPhone to wake the mac the pipeline job will then wake up to run but it will stop at the step where it needs to start a GUI test tool to actually run the test case.

Does anyone have any experience with that? I can’t just turn on the mac 24*7.

----- update -----

According to this KB it seems for shared resource. This probably explains why it does not work for my case.

If you’re sharing your computer’s resources, such as a shared printer or iTunes playlist, you can set your computer to wake from sleep when other users access those resources.

1 Answer 1

1

I used a iMac as a web server and left the computer running 24/7 for months at a time. I did set the Mac to "Put hard disks to sleep when possible" and allowed the display to sleep after 15 minutes. I set the Computer sleep to never.

4
  • Thanks for reply my question and share your experience. I also don't understand why "“wake for network access” does not work. Sep 18, 2018 at 1:59
  • OK I further search apple document it seems that that feature is for shared resource. Sep 18, 2018 at 2:19
  • @Qiulang: In most cases, a computer that acts as a server is never allowed to sleep. You may not find an answer to your question for this reason. In other words, it is not that Apple could not make a server that would sleep until needed, but rather the assumption is a server would be so busy it will never sleep anyway. My server only received at most 7 hits a week, so like you I wanted of have the computer sleep. I did the research, but never found a way for the computer to sleep and still work as a web server. Sep 18, 2018 at 3:22
  • I think your words make sense. It was b/c I found Fing on my iPhone could actually wake up my mac that made me wonder why it can't work for gitlab runner. Sep 18, 2018 at 3:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .