Bladeren bron

Add an official image for Plone (#1434)

* Add Plone
* Update to the latest stable revision
* Remove 5 alpine tags until we have a fix for plone/plone.docker#16
* Update to the latest repo version. Remove bugous alpine tags.
* Release Plone 4.3.8
* Release Plone 5.0.3
* Release Plone 4.3.9 and 5.0.4
* Add built-in support for ZEO clustering
* Release Plone 4.3.10 and 5.0.5
* Add missing dependency for backup: rsync
* Fix docker-entrypoint to watch main process instead of the logging one
* Update to new format
* Add Plone tests
* Update with the latest fixes
* Release 4.3.11 and 5.0.6
* Make Add-ons environment variable more user friendly
* Rename BUILDOUT_EGGS -> PLONE_ADDONS, ADDONS
* Rename BUILDOUT_ZCML -> PLONE_ZCML, ZCML
* Rename BUILDOUT_DEVELOP -> PLONE_DEVELOP, DEVELOP
* Add Deprecation Warnings for renamed env variables
* Fix issues reported by @tianon
* Add Antonio De Marinis to maintainers
* Cleanup plone-addons test
Alin Voinea 9 jaren geleden
bovenliggende
commit
a6760084e6

+ 44 - 0
library/plone

@@ -0,0 +1,44 @@
+Maintainers: Alin Voinea <[email protected]> (@avoinea),
+             Sven Strack <[email protected]> (@svx),
+             Antonio De Marinis <[email protected]> (@demarant)
+GitRepo: https://github.com/plone/plone.docker.git
+
+Tags: 5.0.6, 5.0, 5, latest
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 5.0/5.0.6/debian
+
+Tags: 5.0.5
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 5.0/5.0.5/debian
+
+Tags: 5.0.4
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 5.0/5.0.4/debian
+
+Tags: 5.0.3
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 5.0/5.0.3/debian
+
+Tags: 5.0.2
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 5.0/5.0.2/debian
+
+Tags: 4.3.11, 4.3, 4
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 4.3/4.3.11/debian
+
+Tags: 4.3.10
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 4.3/4.3.10/debian
+
+Tags: 4.3.9
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 4.3/4.3.9/debian
+
+Tags: 4.3.8
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 4.3/4.3.8/debian
+
+Tags: 4.3.7
+GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
+Directory: 4.3/4.3.7/debian

+ 5 - 0
test/config.sh

@@ -130,6 +130,11 @@ imageTests+=(
 	[php:fpm]='
 	[php:fpm]='
 		php-fpm-hello-web
 		php-fpm-hello-web
 	'
 	'
+	[plone]='
+		plone-basics
+		plone-addons
+		plone-zeoclient
+	'
 	[postgres]='
 	[postgres]='
 		postgres-basics
 		postgres-basics
 		postgres-initdb
 		postgres-initdb

+ 6 - 0
test/tests/plone-addons/expected-std-out.txt

@@ -0,0 +1,6 @@
+
+[buildout]
+extends = develop.cfg
+develop += src/eea.facetednavigation
+eggs += eea.facetednavigation
+zcml += eea.facetednavigation-meta

+ 9 - 0
test/tests/plone-addons/run.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+set -eo pipefail
+
+docker run -i --rm \
+	-e PLONE_DEVELOP=src/eea.facetednavigation \
+	-e PLONE_ADDONS=eea.facetednavigation \
+	-e PLONE_ZCML=eea.facetednavigation-meta \
+	-v /plone/instance/bin/develop \
+	"$1" cat custom.cfg

+ 38 - 0
test/tests/plone-basics/run.sh

@@ -0,0 +1,38 @@
+#!/bin/bash
+set -eo pipefail
+
+dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+image="$1"
+
+PLONE_TEST_SLEEP=3
+PLONE_TEST_TRIES=5
+
+cname="plone-container-$RANDOM-$RANDOM"
+cid="$(docker run -d --name "$cname" "$image")"
+trap "docker rm -vf $cid > /dev/null" EXIT
+
+get() {
+	docker run --rm -i \
+		--link "$cname":plone \
+		--entrypoint python \
+		"$image" \
+		-c "import urllib2; con = urllib2.urlopen('$1'); print con.read()"
+}
+
+get_auth() {
+	docker run --rm -i \
+		--link "$cname":plone \
+		--entrypoint python \
+		"$image" \
+		-c "import urllib2; request = urllib2.Request('$1'); request.add_header('Authorization', 'Basic $2'); print urllib2.urlopen(request).read()"
+}
+
+
+. "$dir/../../retry.sh" --tries "$PLONE_TEST_TRIES" --sleep "$PLONE_TEST_SLEEP" get "http://plone:8080"
+
+# Plone is up and running
+[[ "$(get 'http://plone:8080')" == *"Plone is up and running"* ]]
+
+# Create a Plone site
+[[ "$(get_auth 'http://plone:8080/@@plone-addsite' "$(echo -n 'admin:admin' | base64)")" == *"Create a Plone site"* ]]

+ 44 - 0
test/tests/plone-zeoclient/run.sh

@@ -0,0 +1,44 @@
+#!/bin/bash
+set -eo pipefail
+
+dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+image="$1"
+
+PLONE_TEST_SLEEP=3
+PLONE_TEST_TRIES=5
+
+# Start ZEO server
+zname="zeo-container-$RANDOM-$RANDOM"
+zid="$(docker run -d --name "$zname" "$image" zeoserver)"
+
+# Start Plone as ZEO Client
+pname="plone-container-$RANDOM-$RANDOM"
+pid="$(docker run -d --name "$pname" --link=$zname:zeo -e ZEO_ADDRESS=zeo:8100 "$image")"
+
+# Tear down
+trap "docker rm -vf $pid $zid > /dev/null" EXIT
+
+get() {
+	docker run --rm -i \
+		--link "$pname":plone \
+		--entrypoint python \
+		"$image" \
+		-c "import urllib2; con = urllib2.urlopen('$1'); print con.read()"
+}
+
+get_auth() {
+	docker run --rm -i \
+		--link "$pname":plone \
+		--entrypoint python \
+		"$image" \
+		-c "import urllib2; request = urllib2.Request('$1'); request.add_header('Authorization', 'Basic $2'); print urllib2.urlopen(request).read()"
+}
+
+. "$dir/../../retry.sh" --tries "$PLONE_TEST_TRIES" --sleep "$PLONE_TEST_SLEEP" get "http://plone:8080"
+
+# Plone is up and running
+[[ "$(get 'http://plone:8080')" == *"Plone is up and running"* ]]
+
+# Create a Plone site
+[[ "$(get_auth 'http://plone:8080/@@plone-addsite' "$(echo -n 'admin:admin' | base64)")" == *"Create a Plone site"* ]]