6

I'm relatively new to Gitlab and Gitlab CI (actually with the whole CI thing), I have successfully setup my Gitlab Server and Gitlab CI Server both on the same machine (well due to lack spare servers, and pretty much because our team is still in "beta" phase on this whole CI thing).

We have two projects working on right now, an angular project (as web client) and a flask project (as web service). I have successfully setup our angular project both in the Gitlab and Gitlab CI (works great, it run our tests and build scripts perfectly fine).

But now I want to setup our flask project too, so we can apply Continuous Integration with it too, and for that were gonna use tox to run our test scripts, etc (were using gulp for our angular project).

And here is our pretty basic tox.ini:

[tox]
skipsdist = True
envlist = py27

[flake8]
max-line-length = 79
exclude = venv, .tox
max-complexity = 10

[testenv]
deps=-rrequirements/testing.txt
changedir=tests
commands=py.test

and in our Gitlab CI Jobs, i just put tox there since that's all i am executing on my development server (this setup works fine in my development machine, just running tox even if i'm not on a virtualenv), but i keep on having this permission denied error on my Gitlab CI when running this command (see below)

gitlab-ci-multi-runner 0.3.3 (dbaf96f)
Using Shell executor...
Running on hikari...
Fetching changes...
Removing .tox/
Checkouting 8325a2a2 as master...

tox
py27 create: /home/gitlab_ci_multi_runner/tmp/builds/runner-b0fcd933-    project-5-concurrent-0/gitlab.amici.com.ph/hris/xi-flask-starter-kit/.tox/py27
py27 installdeps: -rrequirements/testing.txt
ERROR: invocation failed (errno 13), args: [local('/home /gitlab_ci_multi_runner/tmp/builds/runner-b0fcd933-project-5-concurrent- 0/gitlab.amici.com.ph/hris/xi-flask-starter-kit/.tox/py27/bin/pip'),  'install', '-rrequirements/testing.txt'], cwd: /home/gitlab_ci_multi_runner /tmp/builds/runner-b0fcd933-project-5-concurrent-0/gitlab.amici.com.ph /hris/xi-flask-starter-kit
Traceback (most recent call last):
  File "/usr/local/bin/tox", line 11, in <module>
    sys.exit(cmdline())
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 39, in main
    retcode = Session(config).runcommand()
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 367, in runcommand
   return self.subcommand_test()
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 518, in subcommand_test
    if self.setupenv(venv):
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 423, in setupenv
    status = venv.update(action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 139, in update
    self.install_deps(action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 249, in install_deps
    self._install(deps, action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 317, in _install
    action=action, extraenv=extraenv)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 283, in run_install_command
    extraenv=extraenv, action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 384, in _pcall
    return action.popen(args, cwd=cwd, env=env, redirect=redirect, ignore_ret=ignore_ret)
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 130, in popen
    stdout=stdout, stderr=STDOUT)
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 218, in _popen
    stdout=stdout, stderr=stderr, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

By the way i'm using the new gitlab-ci-multi-runner and the I pretty much recycled the runner i am using on my angular projects (I tried registering a new one for our flask project on the same machine but it doesn't respond when i try to test it)

Also i've already installed tox globally using sudo pip install tox, since this is pretty much what i just did with our angular projects sudo npm install -g bower gulp and sudo npm install npm -g,

then I just put

npm install
bower install
gulp build

on our angular project CI Job

cj cabero
  • 383
  • 10
  • 23

0 Answers0