mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
Compare commits
12 Commits
3.6.3+1804
...
3.8.1+1805
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
806f92df4b | ||
|
|
107c57f82c | ||
|
|
8d96eee149 | ||
|
|
038ccda1f5 | ||
|
|
4cf3ada28d | ||
|
|
1422a7f90c | ||
|
|
60c137bbb0 | ||
|
|
eab1b832b6 | ||
|
|
89068ea89d | ||
|
|
c7f1bee380 | ||
|
|
cb3f54eb90 | ||
|
|
f143587953 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
.\#*
|
||||
|
||||
.venv/
|
||||
container-structure-test
|
||||
@@ -2,9 +2,10 @@ sudo: required
|
||||
language: bash
|
||||
services:
|
||||
- docker
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: TEST=limesurvey-apache
|
||||
script: docker build -t martialblog/limesurvey-apache -f apache/Dockerfile .
|
||||
- env: TEST=limesurvey-fpm
|
||||
script: docker build -t martialblog/limesurvey-fpm -f fpm/Dockerfile .
|
||||
- env: TAG=martialblog/limesurvey-apache
|
||||
script: docker build -q -t $TAG -f apache/Dockerfile . && tests/run.sh $TAG
|
||||
- env: TAG=martialblog/limesurvey-fpm
|
||||
script: docker build -q -t $TAG -f fpm/Dockerfile . && tests/run.sh $TAG
|
||||
|
||||
34
CONTRIBUTING.md
Normal file
34
CONTRIBUTING.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Contributing
|
||||
|
||||
Every Pull Request is welcome.
|
||||
|
||||
## Upgrading the Version
|
||||
|
||||
To upgrade the LimeSurvey Version the ARG variable needs to be changed.
|
||||
|
||||
```bash
|
||||
$ grep Agrep ARG apache/Dockerfile
|
||||
ARG version='3.7.0+180418'
|
||||
```
|
||||
|
||||
Since this is a reoccuring and boring task, a script is provided.
|
||||
|
||||
```bash
|
||||
# Dependencies
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip3 install -r requirements.txt
|
||||
|
||||
# Upgrades to latest Limesurvey version
|
||||
./upgrade.py
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
In order to make sure the image works as promised, some tests are provided:
|
||||
|
||||
```bash
|
||||
./tests/run.sh
|
||||
```
|
||||
|
||||
For further information: https://github.com/GoogleContainerTools/container-structure-test
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM php:7.2-apache
|
||||
LABEL maintainer="markus@martialblog.de"
|
||||
ARG version='3.6.3+180416'
|
||||
ARG version='3.8.1+180524'
|
||||
|
||||
# Install OS dependencies
|
||||
RUN apt-get update && \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM php:7.2-fpm
|
||||
LABEL maintainer="markus@martialblog.de"
|
||||
ARG version='3.6.3+180416'
|
||||
ARG version='3.8.1+180524'
|
||||
|
||||
# Install OS dependencies
|
||||
RUN apt-get update && \
|
||||
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
feedparser==5.2.1
|
||||
77
tests/image_tests.yaml
Normal file
77
tests/image_tests.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
schemaVersion: "2.0.0"
|
||||
|
||||
globalEnvVars:
|
||||
- key: "PATH"
|
||||
value: "/env/bin:$PATH"
|
||||
|
||||
fileContentTests:
|
||||
- name: 'Limesurvey admin file content'
|
||||
path: '/var/www/html/admin/index.php'
|
||||
expectedContents: ['LimeSurvey']
|
||||
|
||||
fileExistenceTests:
|
||||
- name: 'Limesurvey files'
|
||||
path: '/var/www/html/index.php'
|
||||
shouldExist: true
|
||||
permissions: '-rw-rw-r--'
|
||||
- name: 'Limesurvey admin files'
|
||||
path: '/var/www/html/admin/index.php'
|
||||
shouldExist: true
|
||||
permissions: '-rw-rw-r--'
|
||||
- name: 'Ldap syslink'
|
||||
path: '/usr/lib/x86_64-linux-gnu/libldap.so'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - gd"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-gd.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - imap"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-imap.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - ldap"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - pgsql"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-pgsql.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - zip"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-zip.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - sodium"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - pdo_mysql"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini'
|
||||
shouldExist: true
|
||||
- name: "Dependencies - PHP - pdo_pgsql"
|
||||
path: '/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini'
|
||||
shouldExist: true
|
||||
|
||||
commandTests:
|
||||
- name: "Dependencies - libldap2-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "libldap2-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - zlib1g-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "zlib1g-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - libc-client-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "libc-client-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - libkrb5-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "libkrb5-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - libpng-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "libpng-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - libpq-dev"
|
||||
command: "dpkg"
|
||||
args: ["-l", "libpq-dev"]
|
||||
exitCode: 0
|
||||
- name: "Dependencies - PHP Modules"
|
||||
command: "php"
|
||||
args: ["-m"]
|
||||
expectedOutput: ["ldap", "zip", "pdo_mysql", "pdo_sqlite", "gd", "mbstring", "PDO", "imap"]
|
||||
11
tests/run.sh
Executable file
11
tests/run.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IMAGE=$1
|
||||
|
||||
if [ ! -f container-structure-test ]; then
|
||||
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64
|
||||
mv container-structure-test-linux-amd64 container-structure-test
|
||||
chmod +x container-structure-test
|
||||
fi
|
||||
|
||||
./container-structure-test test --image $IMAGE --config tests/image_tests.yaml
|
||||
18
upgrade.py
18
upgrade.py
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
import argparse
|
||||
import feedparser
|
||||
import sys
|
||||
import subprocess
|
||||
@@ -17,12 +18,22 @@ docker_feed = feedparser.parse(docker_feed_url)
|
||||
limesv_current_release = limesv_feed.entries[0].title_detail.value
|
||||
docker_current_release = docker_feed.entries[0].title_detail.value
|
||||
|
||||
argumentparser = argparse.ArgumentParser(description='Updates the LimeSurvey Version in the Dockerfiles')
|
||||
argumentparser.add_argument('--noop', dest='noop', action="store_true", required=False, help="Don't push just commit")
|
||||
argumentparser.add_argument('--check', dest='check', action="store_true", required=False, help="Only check if there's a new version available")
|
||||
|
||||
cmdargs = argumentparser.parse_args()
|
||||
|
||||
if limesv_current_release == docker_current_release:
|
||||
print('Nothing to do.')
|
||||
sys.exit(0)
|
||||
|
||||
print('New Version {} available. Upgrading...'.format(limesv_current_release))
|
||||
commit_message = 'Update to Version {}'.format(limesv_current_release)
|
||||
print('New Version {} available.'.format(limesv_current_release))
|
||||
|
||||
if cmdargs.check:
|
||||
sys.exit(0)
|
||||
|
||||
commit_message = 'Updating to Version {}'.format(limesv_current_release)
|
||||
|
||||
# Dockerfiles
|
||||
regexp = 's/[0-9]\.[0-9]\.[0-9]+[0-9]*/{new_version}/'.format(new_version=limesv_current_release)
|
||||
@@ -38,6 +49,9 @@ subprocess.call(['git', 'commit', '-m', commit_message])
|
||||
subprocess.call(['git', 'tag', limesv_current_release])
|
||||
print('> Created new Commit and Tag')
|
||||
|
||||
if cmdargs.noop:
|
||||
sys.exit(0)
|
||||
|
||||
# Git Push
|
||||
# subprocess.call(['git', 'push', 'origin', limesv_current_release])
|
||||
subprocess.call(['git', 'push'])
|
||||
|
||||
Reference in New Issue
Block a user