From 4cdd0e676fe2c978afbf32005b616779d58d5f96 Mon Sep 17 00:00:00 2001 From: Raul Barreras <rbarreras@nebraska.edu> Date: Mon, 16 Sep 2019 17:03:11 +0000 Subject: [PATCH] Update t/php-lint/tests.sh, .gitlab-ci.yml files --- .gitlab-ci.yml | 10 +++++++++- t/php-lint/tests.sh | 12 +++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f14d465..f9dd671 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,13 +27,21 @@ Make All Images: script: - make -test: +Test Sonar Scanner: stage: test tags: - dockerd script: - docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v +Test PHP Lint: + stage: test + tags: + - linux, dockerd + script: + - t/php-lint/tests.sh + + Push to Container Registry: after_script: - rm -f /var/lib/gitlab-runner/.docker/config.json diff --git a/t/php-lint/tests.sh b/t/php-lint/tests.sh index 5c1da2e..d3cb8be 100755 --- a/t/php-lint/tests.sh +++ b/t/php-lint/tests.sh @@ -3,6 +3,12 @@ chmod 777 ${TMP_DIR} touch "${TMP_DIR}/dumb php file with spaces.php" touch "${TMP_DIR}/ddumb_php_file_without_spaces.php" touch "${TMP_DIR}/$(printf '\u03c0').php" -docker run -it --rm -v "${TMP_DIR}:/work" its-registry.unl.edu/unl-its/docker-ci/php-lint:latest php-lint -d /work -echo $? - +docker run -it --rm -v "${TMP_DIR}:/work" its-registry.unl.edu/unl-its/docker-ci/php-lint:latest php-lint -d /work > /dev/null 2>&1 +RET=$? +rm -rf ${TMP_DIR} +if [ $RET -eq 0 ]; then + echo "PASS"; +else + echo "FAIL"; +fi +exit $RES -- GitLab