Commit 1041d036 authored by Robin Fischer's avatar Robin Fischer

Update .configuration-buildmachines.yml to have an count on when to unload the coffee

parent 7941ba25
......@@ -9,7 +9,11 @@
GIT_STRATEGY: none
before_script:
# Modify a file and count up how often we have waked. Then only wake when file is zero and set to sleep when file is 1
- launchctl load ~/Library/LaunchAgents/local.caffeinate.plist
- if [ -z ${GITLAB_RUNNER_WAKE_LOCK_COUNT} ]; then export GITLAB_RUNNER_WAKE_LOCK_COUNT=0; fi
- echo "Current Caffeinate Count ${GITLAB_RUNNER_WAKE_LOCK_COUNT} loading increasing by one"
- if [ ${GITLAB_RUNNER_WAKE_LOCK_COUNT} == 0 ]; then echo"Loading";launchctl load ~/Library/LaunchAgents/local.caffeinate.plist; fi
- GITLAB_RUNNER_WAKE_LOCK_COUNT=$((GITLAB_RUNNER_WAKE_LOCK_COUNT+1))
#- launchctl load ~/Library/LaunchAgents/local.caffeinate.plist
#- rm -rf gitlab-ci
#- BASE_URL=`echo $CI_REPOSITORY_URL | sed "s;\/*$CI_PROJECT_PATH.*;;"`
#- REPO_URL="${BASE_URL}/robinryf/gitlab-ci.git"
......@@ -24,5 +28,7 @@
variables:
GIT_STRATEGY: none
before_script:
- launchctl unload ~/Library/LaunchAgents/local.caffeinate.plist
- echo "Current Caffeinate Count ${GITLAB_RUNNER_WAKE_LOCK_COUNT}. Reducing by one"
- GITLAB_RUNNER_WAKE_LOCK_COUNT=$((GITLAB_RUNNER_WAKE_LOCK_COUNT-1))
- if [ ${GITLAB_RUNNER_WAKE_LOCK_COUNT} == 0 ]; then echo "Unloading";launchctl unload ~/Library/LaunchAgents/local.caffeinate.plist; fi
when: always
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment