Skip to content

Commit 13f0d18

Browse files
committed
init gitlab ci
1 parent 21fa7fe commit 13f0d18

File tree

3 files changed

+73
-7
lines changed

3 files changed

+73
-7
lines changed

.gitlab-ci.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Install dependencies only for Docker.
4+
[[ ! -e /.dockerinit ]] && exit 0
5+
set -xe
6+
7+
# Update packages and install composer and PHP dependencies.
8+
apt-get update -yqq
9+
apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq
10+
11+
# Compile PHP, include these extensions.
12+
docker-php-ext-install mbstring mcrypt pdo_mysql curl json intl gd xml zip bz2 opcache
13+
14+
# Install Composer and project dependencies.
15+
curl -sS https://getcomposer.org/installer | php
16+
php composer.phar install
17+
18+
# Copy over testing configuration.
19+
# cp .env.testing .env
20+

.gitlab-ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
before_script:
2+
- bash .gitlab-ci.sh
3+
4+
variables:
5+
MYSQL_DATABASE: project_name
6+
MYSQL_ROOT_PASSWORD: secret
7+
8+
phpunit:php5.5:mysql5.6:
9+
image: php:5.5
10+
services:
11+
- mysql:5.6
12+
script:
13+
- php vendor/bin/phpunit --colors
14+
15+
phpunit:php5.6:mysql5.6:
16+
image: php:5.6
17+
services:
18+
- mysql:5.6
19+
script:
20+
- php vendor/bin/phpunit --colors
21+
22+
phpunit:php7.0:mysql5.6:
23+
image: php:7.0
24+
services:
25+
- mysql:5.6
26+
script:
27+
- php vendor/bin/phpunit --colors
28+
29+
phpunit:php5.5:mysql5.7:
30+
image: php:5.5
31+
services:
32+
- mysql:5.7
33+
script:
34+
- php vendor/bin/phpunit --colors
35+
36+
phpunit:php5.6:mysql5.7:
37+
image: php:5.6
38+
services:
39+
- mysql:5.7
40+
script:
41+
- php vendor/bin/phpunit --colors
42+
43+
phpunit:php7.0:mysql5.7:
44+
image: php:7.0
45+
services:
46+
- mysql:5.7
47+
script:
48+
- php vendor/bin/phpunit --colors

Dockerfile

+5-7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y \
1414
libxml2-dev \
1515
git \
1616
unzip \
17+
curl \
1718
&& rm -rf /var/lib/apt/lists/* && \
1819
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
1920
docker-php-ext-install gd
@@ -33,15 +34,12 @@ RUN { \
3334
RUN a2enmod rewrite
3435

3536
ENV SSPANEL_VERSION 4.0.0
36-
37-
WORKDIR /var/www
38-
39-
# Install sspanel
40-
RUN rm -rf /var/www/html
41-
4237
VOLUME /var/www/html
43-
RUN git clone -b 4.x-dev https://github.com/orvice/ss-panel.git /var/www/html
38+
WORKDIR /var/www/html
4439

40+
# Install sspanel
41+
#RUN git clone -b 4.x-dev https://github.com/orvice/ss-panel.git /var/www/html
42+
RUN curl https://github.com/orvice/docker-cfg/archive/master.zip && unzip master.zip -d /var/www/html
4543
# Install Composer
4644
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
4745

0 commit comments

Comments
 (0)