diff options
author | Kali Kaneko <kali@leap.se> | 2017-12-05 23:15:45 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-12-07 21:00:03 +0100 |
commit | 90e72e19989f9ccb5e3109e16459865b8075c009 (patch) | |
tree | ee60c7fd8f945d3438a78a3700c65d33d17bc933 | |
parent | f6bf1920f9218928c0a9dea14db76e730dda770e (diff) |
[docs] document how to run osx tests
using virtualbox executor for gitlab-runner
-rw-r--r-- | .gitlab-ci.yml | 3 | ||||
-rw-r--r-- | docs/hacking/osx-virtualbox.rst | 68 |
2 files changed, 70 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b2f6449..ba2fa048 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,8 @@ osx_test: stage: test allow_failure: true script: - - tox --recreate -e py27-dev + - ls -la /usr/bin/gpg + - /usr/local/bin/tox --recreate -e py27-dev tags: - yosemite - osx diff --git a/docs/hacking/osx-virtualbox.rst b/docs/hacking/osx-virtualbox.rst new file mode 100644 index 00000000..ad300644 --- /dev/null +++ b/docs/hacking/osx-virtualbox.rst @@ -0,0 +1,68 @@ +.. _osx-vms: + +OSX Virtualization +============================================ + +If you have acess to a OSX machine, you can setup virtual machines for setting up a gitlab runner. + +Base Image +---------- + +.. note: convert this to ansible script or similar. + +* Install homebrew (via the curl | sh script). + +Install basic packages:: + + brew install gpg1 wget openssl cryptography python + +* Modify $PATH (.bash_profile), source it or login again to activate the PATH. + +* Add a symlink from gpg1 to ``/usr/bin/gpg`` + +Install tox for the tests:: + + pip install tox + +* Copy ssh keys to access this machine. + +* TODO - install virtualbox guest extensions. + + +Gitlab runner (on host) +----------------------- + +* install gitlab-runner for osx [link] +* install virtualbox in the host machine +* configure ``.gitlab-runner/config.toml`` + +Run:: + gitlab-runner run + +Debug mode:: + gilab-runner --debug run + + +Virtualbox cheatsheet +--------------------- + +Some useful commands:: + + # list + VBoxManage list vms + # only running + VBoxManage list runningvms + # start headless + VBoxManage startvm yosemite --type headless + # poweroff + VBoxManage controlvm yosemite poweroff + +gitlab-runner keeps a snapshot with the name 'Base State', so it seems this is +the one you have to be sure that you modify with all the software you need. +It seems to me that if you just delete the first 'Base State' snapshot in the +snapshot sequence, it take the most recent state (virtualbox does a merge). + +This is how ``gitlab-runner`` accesses ssh:: + + VBoxManage modifyvm yosemite-runner-deadbeef --natpf1 gustssh,tcp,127.0.0.1,99999,,22 + |