Gitlab: unable to run python27 tests

Hi, anyone is running successfully tests on gitlab CI with python27?
I'm trying everything but i always have an error when launching a bin script (instance or test).

You can see my configuration and experiments here:
I started with bobtemplates.plone boilerplate.

Buildout compiles correctly, but test instance fails because it seems it doesn't find needed eggs.

The strange thing is that if i switch to python3.7 image, everything runs (the green test in the list).

I ran py2 on GitLab some time ago. Not open source though. By looking at the trace I can not see anything obvious. Are you creating your own virtualenv or using the GitLab/Docker Python?

The strange thing is that Plone cannot find itself:

File "/builds/cekk/example.package/eggs/Products.CMFPlone-5.2.1-py2.7.egg/Products/CMFPlone/", line 8, in <module>

[1547](  __version__ = pkg_resources.require("Products.CMFPlone")[0].version
   File "/builds/cekk/example.package/venv/lib/python2.7/site-packages/pkg_resources/", line 900, in require
     needed = self.resolve(parse_requirements(requirements))

I suspect that setuptools might be the guilty one.

Try to change:

virtualenv --clear -p python2.7 venv


virtualenv --clear -p python2.7 venv --no-site-packages --no-setuptools

@tisto i recall to made some tests some time ago but right now they seem to not work anymore. Probably something changed in python27 image or in setuptools?

@alert --no-site-packages is an unrecognized argument in that virtualenv version.

And yes, the strange thing is that Plone cannot find itself.

In a test with different image (python2.7-stretch) i had a different error:

 DistributionNotFound: The 'Zope2' distribution was not found and is required by the application

Did you try:

virtualenv --clear -p python2.7 venv --no-setuptools

We are doing some python2.7 testing in Gitlab-CI but it's not Plone specific. The .gitab-ci.yml file looks like this:

I created a docker image for this: Instead of the latest tag use python2. It is based on bobtemplates.plone's .gitlab-ci.yml and can be used with any Plone project. I use this as base for some customers now. The image is available on The readme shows an example usage.

Tried @tmassman image with python2 tag and conf in the readme, and i have the same exact result.

I've also tried with a less recent version of setuptools but i still have the same errors.

Which virtualenv version do you have. I am finding some broken builds with virtualenv 20 (released Feb this year)

Plone Foundation Code of Conduct