plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

github action - publish docker images #916

Closed psanlorenzo closed 4 years ago

psanlorenzo commented 4 years ago

911

Edit: Setting secrets for dockerhub authentication. (Repository settings -> secrets) image More info: Github docs

mister-roboto commented 4 years ago

@psanlorenzo you need to sign the Plone Contributor Agreement in order to merge this pull request.

Learn about the Plone Contributor Agreement: http://docs.plone.org/develop/coredev/docs/contributors_agreement_explained.html

masipcat commented 4 years ago

@psanlorenzo Can you describe (or point to the documentation) how to configure the docker secrets or any other configuration needed for Github actions?

masipcat commented 4 years ago

Some items:

* Its more important to get a test result than to create the docker image (its minutes of Github actions that AFAIK nobody is using G standalone Docker Image)

The motivation behind this PR is to have a generic docker image to be able to test guillotina_react (https://github.com/plone/guillotina/issues/911)

Also, I don't think this would consume a lot of minutes, and I it's a starting point for https://github.com/plone/guillotina/issues/907

* Docker image should be in plone namespace.

Agree! Who has permissions to create it?

* Contribution agreement is a Must.

WIP, we'll send it to Andy soon

jordic commented 4 years ago

Agreement send! Sorry it was on my mailbox.. Yes! We need to have fresh guillotina docker images to be able to launch e2e testing on guillotina_react. On the end this benefits both, because if there is something wrong on a merge, we can catch it later... (Thought that, right now, we don't have any kind of e2e testing on guillotina side)

Anyway, if it's too complicate, we can just move it to our CI and deploy the docker images to our dockerhub profile... (this will also do the job for us).

bloodbare commented 4 years ago

Agreement send! Sorry it was on my mailbox.. Yes! We need to have fresh guillotina docker images to be able to launch e2e testing on guillotina_react. On the end this benefits both, because if there is something wrong on a merge, we can catch it later... (Thought, that right now we don't have any kind of e2e testing on guillotina side)

Docker HUB provides a service for open source projectes like this for free to build any docker image:

I configured it to build plone/guillotina:latest from master and plone/guillotina:release for each tag

https://hub.docker.com/r/plone/guillotina

bloodbare commented 4 years ago

The dockerfile fails

Removing intermediate container a539cb7e61e5
---> 1c55da0171a4
Step 11/12 : COPY . /app
---> e444d1c19eb3
Step 12/12 : RUN pip install /app
---> Running in ef12fa8581bf
Processing /app
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
 ERROR: Complete output from command /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp_uqb6lmu:
ERROR: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-m_p85jvo/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 148, in get_requires_for_build_wheel
config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-m_p85jvo/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 128, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-m_p85jvo/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 250, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-m_p85jvo/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 143, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 7, in <module>
long_description = open("README.rst").read() + "\n"
FileNotFoundError: [Errno 2] No such file or directory: 'README.rst'
----------------------------------------

Getting requirements to build wheel: finished with status 'error'
ERROR: Command "/usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp_uqb6lmu" failed with error code 1 in /tmp/pip-req-build-f04y9rl8

WARNING: You are using pip version 19.1.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Removing intermediate container ef12fa8581bf
The command '/bin/sh -c pip install /app' returned a non-zero code: 1