diff options
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | bin/deploy.sh | 10 | ||||
-rw-r--r-- | contrib/Dockerfile | 1 |
4 files changed, 9 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 051a5bbe..431e3d08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/). diff --git a/bin/deploy.sh b/bin/deploy.sh index 15795011..48808d5b 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -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\" " diff --git a/contrib/Dockerfile b/contrib/Dockerfile index 268f9218..269b89b9 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -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 |