Skip to content

Commit 810ed16

Browse files
author
Marius Burkard
committed
Merge branch 'patch-ci-test-install' into 'develop'
add CI test to install ispconfig in a clean container See merge request ispconfig/ispconfig3!884
2 parents 0f73b2c + 368e1c3 commit 810ed16

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
stages:
33
- syntax
44
- syntax_diff
5+
- test
56

67
#
78
### Stage syntax
@@ -49,3 +50,16 @@ syntax_diff:lint:
4950
# - echo "For more information http://www.icosaedro.it/phplint/"
5051
# - vendor/bin/phplint
5152

53+
54+
test:install:
55+
stage: test
56+
image: jerob/docker-ispconfig
57+
only:
58+
- schedules
59+
- web
60+
script:
61+
- $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
62+
- apt-get update
63+
- apt-get --yes install curl
64+
- curl --insecure https://127.0.0.1:8080/login/
65+
- ps xaf
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
# This script is used from .gitlab-ci.yml to do an automated installation inside a docker container for testing.
4+
5+
if [ -f /usr/local/ispconfig/interface/lib/config.inc.php ]; then
6+
echo "Found an existing configfile, bailing out!"
7+
exit 1
8+
fi
9+
10+
mysql_install_db
11+
service mysql start \
12+
&& echo "UPDATE mysql.user SET Password = PASSWORD('pass') WHERE User = 'root';" | mysql -u root \
13+
&& echo "UPDATE mysql.user SET plugin='mysql_native_password' where user='root';" | mysql -u root \
14+
&& echo "DELETE FROM mysql.user WHERE User='';" | mysql -u root \
15+
&& echo "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" | mysql -u root \
16+
&& echo "DROP DATABASE IF EXISTS test;" | mysql -u root \
17+
&& echo "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';" | mysql -u root \
18+
&& echo "FLUSH PRIVILEGES;" | mysql -u root
19+
sed -i "s/^hostname=server1.example.com$/hostname=$HOSTNAME/g" /root/ispconfig3_install/install/autoinstall.ini
20+
21+
service mysql start && php -q $CI_PROJECT_DIR/install/install.php --autoinstall=/root/ispconfig3_install/install/autoinstall.ini

0 commit comments

Comments
 (0)