#254 Add container tests
Merged 4 years ago by puiterwijk. Opened 4 years ago by puiterwijk.
puiterwijk/ipsilon containertest  into  master

file modified
+37
@@ -142,3 +142,40 @@ 

  	mv $(RPMBUILD)/RPMS/*/ipsilon-*.rpm dist/rpms/

  	mv $(RPMBUILD)/SRPMS/ipsilon-*.src.rpm dist/srpms/

  	rm -rf $(RPMBUILD)

+ 

+ # Testing within containers

+ container-centos7:

+ 	echo "Building CentOS 7 container ..."

+ 	(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-centos tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/centos:7/' | sudo docker build -f - -q -t ipsilon-centos7 -

+ 	echo "CentOS 7 container built"

+ 

+ container-fedora24:

+ 	echo "Building Fedora 24 container ..."

+ 	(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:24/' | sudo docker build -f - -q -t ipsilon-fedora24 -

+ 	echo "Fedora 24 container built"

+ 

+ container-fedora25:

+ 	echo "Building Fedora 25 container ..."

+ 	(cat tests/containers/Dockerfile-base tests/containers/Dockerfile-fedora tests/containers/Dockerfile-rpm; echo "USER testuser") | sed -e 's/BASE/fedora:25/' | sudo docker build -f - -q -t ipsilon-fedora25 -

+ 	echo "Fedora 25 container built"

+ 

+ containers: container-fedora24 container-fedora25

+ 	echo "Containers built"

+ 

+ containertest-centos7: container-centos7

+ 	echo "Starting CentOS 7 tests ..."

+ 	sudo docker run -v `pwd`:/code -t --rm -a stderr ipsilon-centos7

+ 	echo "CentOS 7 passed"

+ 

+ containertest-fedora24: container-fedora24

+ 	echo "Starting Fedora 24 tests ..."

+ 	sudo docker run -v `pwd`:/code -t --rm -a stderr ipsilon-fedora24

+ 	echo "Fedora 24 passed"

+ 

+ containertest-fedora25: container-fedora25

+ 	echo "Starting Fedora 25 tests ..."

+ 	sudo docker run -v `pwd`:/code -t --rm -a stderr ipsilon-fedora25

+ 	echo "Fedora 25 passed"

+ 

+ containertest: containertest-centos7 containertest-fedora24 containertest-fedora25

+ 	echo "Container tests passed"

@@ -0,0 +1,6 @@ 

+ FROM BASE

+ VOLUME ["/code"]

+ RUN useradd testuser \

+     && chown testuser:testuser /code

+ WORKDIR /code

+ ENTRYPOINT ["/usr/bin/make", "testdeps", "test"]

@@ -0,0 +1,1 @@ 

+ RUN yum install -y epel-release

empty or binary file added
@@ -0,0 +1,13 @@ 

+ RUN yum update -y \

+     && yum install -y which

+ # This should be kept in sync with the develop page on the website.

+ # Distro-specific packages should go in the distro sub-dockerfiles.

+ RUN yum install -y make pylint python-pep8 python-openid python-openid-teams \

+         python-openid-cla python-cherrypy m2crypto lasso-python \

+         python-sqlalchemy python-ldap python-pam python-fedora \

+         freeipa-python httpd mod_auth_mellon postgresql-server \

+         openssl mod_wsgi python-jinja2 python-psycopg2 sssd \

+         libsss_simpleifp openldap-servers mod_auth_gssapi krb5-server \

+         socket_wrapper nss_wrapper python-requests-kerberos python-lesscpy\

+         nodejs-less krb5-workstation python-sssdconfig sqlite python-jwcrypto \

+         mod_ssl mod_auth_openidc python-jwcrypto