From a8528572e1a61c65f8501c5de047003c78b7bb94 Mon Sep 17 00:00:00 2001 From: Benjamin GUILLON <benjamin.guillon@cc.in2p3.fr> Date: Fri, 3 Apr 2020 11:21:11 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a35c305..961dab46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,9 +14,13 @@ build: stage: build script: - docker build --pull -t "$CI_REGISTRY_IMAGE/php-build:$CI_COMMIT_REF_SLUG" -f ./docker/php-build/Dockerfile . - - mkdir php-build && docker cp $(docker create "$CI_REGISTRY_IMAGE/php-build:$CI_COMMIT_REF_SLUG"):/var/www/html php-build + - mkdir php-build && docker cp $(docker create "$CI_REGISTRY_IMAGE/php-build:$CI_COMMIT_REF_SLUG"):/var/www/html/* php-build - pwd && ls -la php-build + after_script: + # Workaround to exclude unwanted files in artifact + - rm -rf php-build/var artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME" paths: - php-build @@ -43,6 +47,7 @@ test: GIT_STRATEGY: none dependencies: [] script: + - pwd && ls -la - docker run $CI_REGISTRY_IMAGE/php-fpm:$CI_COMMIT_REF_SLUG sh ./tms/vendor/bin/simple-phpunit --configuration phpunit.xml.dist ## TODO: Define unit tests ## TODO: Add unit tests report as job artifact -- GitLab