Fixups and cleanup for GitLab CI

main
Igor Scheller 6 years ago committed by msquare
parent 2c1c00e9c9
commit 9f1ee0c6c6

@ -51,10 +51,6 @@ test:
when: always
paths:
- ./coverage/
- ./unittests.xml
when: always
reports:
junit: ./unittests.xml
coverage: '/^\s*Lines:\s*(\d+(?:\.\d+)?%)/'
before_script:
- apk add $PHPIZE_DEPS && pecl install xdebug && docker-php-ext-enable xdebug
@ -63,15 +59,10 @@ test:
- HOMEDIR=$(pwd)
- cd "${DOCROOT}"
- composer --no-ansi install --dev
- chmod +x ./bin/migrate
- ./bin/migrate
script:
- set +e
- vendor/bin/phpunit -v --colors=never --coverage-text --coverage-html "${HOMEDIR}/coverage/" --log-junit "${HOMEDIR}/unittests.xml"
- status=$?
- set -e
- sed -i "s~${DOCROOT}~${HOMEDIR}/~g" "${HOMEDIR}/unittests.xml"
- exit $status
- vendor/bin/phpunit -v --colors=never --coverage-text --coverage-html "${HOMEDIR}/coverage/"
- ./bin/migrate down
release-image:
<<: *docker_definition
@ -102,7 +93,6 @@ release-image.nginx:
.deploy_template_script:
# Configure SSH
- &deploy_template_script |-
apt update && apt install -yqq rsync openssh-client
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" | sed -e 's/\r//g' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519

@ -112,7 +112,7 @@ For usage see `./bin/deploy.sh -h`
##### bin/migrate
The `bin/migrate` script can be used to import and update the database of the engelsystem.
For more information on how to use it call `bin/migrate help`
For more information on how to use it call `./bin/migrate help`
### Codestyle
Please ensure that your pull requests follow [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/).

@ -58,13 +58,13 @@ ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "${remote_hos
set -e
if [[ -f \"${remote_path}/current/config/config.php\" ]]; then
echo \"Config backup\"
cp \"${remote_path}/current/config/config.php\" \"${deploy_id}-config.php\"
echo \"Restoring config\"
cp \"${deploy_id}-config.php\" \"${remote_path}/${deploy_id}/config/config.php\"
echo \"Configuring\"
cp \"${remote_path}/current/config/config.php\" \"${remote_path}/${deploy_id}/config/config.php\"
fi
echo \"Changing symlink\"
ln -nsf \"${remote_path}/${deploy_id}\" \"${remote_path}/current\"
echo \"Migrating\"
php \"${remote_path}/current/bin/migrate\"
"

@ -13,6 +13,7 @@ RUN yarn build
# Intermediate container for less layers
FROM alpine as data
COPY bin/ /app/bin
COPY config/ /app/config
COPY db/ /app/db
COPY includes/ /app/includes

Loading…
Cancel
Save