[REF] packaging: redhat: use fedora for testing
Creating a centos docker image fails on our nightly server with this issue: https://github.com/docker/hub-feedback/issues/461 To create a centos image, we used another repository to host the image and we make it build in docker hub, then we pulled it. It was getting really annoying.
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
# Please note that this Dockerfile is used for testing nightly builds and should
|
||||
# not be used to deploy Odoo
|
||||
FROM centos:centos7
|
||||
FROM fedora:24
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
# Dependencies and postgres
|
||||
RUN yum install -d 0 -e 0 epel-release -y && \
|
||||
yum update -d 0 -e 0 -y && \
|
||||
yum install -d 0 -e 0 \
|
||||
RUN dnf update -d 0 -e 0 -y && \
|
||||
dnf install -d 0 -e 0 \
|
||||
babel \
|
||||
libxslt-python \
|
||||
nodejs-less \
|
||||
@@ -39,7 +38,7 @@ RUN yum install -d 0 -e 0 epel-release -y && \
|
||||
postgresql-libs \
|
||||
postgresql-contrib \
|
||||
postgresql-devel -y && \
|
||||
yum clean all
|
||||
dnf clean all
|
||||
|
||||
RUN easy_install pyPdf vatnumber pydot psycogreen suds ofxparse XlsxWriter
|
||||
|
||||
+12
-12
@@ -291,11 +291,11 @@ def _prepare_testing(o):
|
||||
subprocess.call(["docker", "build", "-t", "odoo-%s-debian-nightly-tests" % version, "."],
|
||||
cwd=os.path.join(o.build_dir, "docker_debian"))
|
||||
if not o.no_rpm:
|
||||
subprocess.call(["mkdir", "docker_centos"], cwd=o.build_dir)
|
||||
subprocess.call(["cp", "package.dfcentos", os.path.join(o.build_dir, "docker_centos", "Dockerfile")],
|
||||
subprocess.call(["mkdir", "docker_fedora"], cwd=o.build_dir)
|
||||
subprocess.call(["cp", "package.dffedora", os.path.join(o.build_dir, "docker_fedora", "Dockerfile")],
|
||||
cwd=os.path.join(o.odoo_dir, "setup"))
|
||||
subprocess.call(["docker", "build", "-t", "odoo-%s-centos-nightly-tests" % version, "."],
|
||||
cwd=os.path.join(o.build_dir, "docker_centos"))
|
||||
subprocess.call(["docker", "build", "-t", "odoo-%s-fedora-nightly-tests" % version, "."],
|
||||
cwd=os.path.join(o.build_dir, "docker_fedora"))
|
||||
|
||||
def test_tgz(o):
|
||||
with docker('odoo-%s-src-nightly-tests' % version, o.build_dir, o.pub) as wheezy:
|
||||
@@ -321,16 +321,16 @@ def test_deb(o):
|
||||
wheezy.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
|
||||
|
||||
def test_rpm(o):
|
||||
with docker('odoo-%s-centos-nightly-tests' % version, o.build_dir, o.pub) as centos7:
|
||||
centos7.release = '*.noarch.rpm'
|
||||
with docker('odoo-%s-fedora-nightly-tests' % version, o.build_dir, o.pub) as fedora24:
|
||||
fedora24.release = '*.noarch.rpm'
|
||||
# Start postgresql
|
||||
centos7.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
|
||||
centos7.system('sleep 5')
|
||||
centos7.system('su postgres -c "createdb mycompany"')
|
||||
fedora24.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
|
||||
fedora24.system('sleep 5')
|
||||
fedora24.system('su postgres -c "createdb mycompany"')
|
||||
# Odoo install
|
||||
centos7.system('yum install -d 0 -e 0 /opt/release/%s -y' % centos7.release)
|
||||
centos7.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
|
||||
centos7.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
|
||||
fedora24.system('dnf install -d 0 -e 0 /opt/release/%s -y' % fedora24.release)
|
||||
fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
|
||||
fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/openerp-server.conf -d mycompany &"')
|
||||
|
||||
def test_exe(o):
|
||||
KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start()
|
||||
|
||||
Reference in New Issue
Block a user