Skip to content
Snippets Groups Projects
Verified Commit f48abdad authored by David Beniamine's avatar David Beniamine
Browse files

CI script as an entrypoint

parent 1fdbb5a2
No related branches found
No related tags found
1 merge request!25Add a gitlab-ci file
......@@ -36,7 +36,12 @@ composer:
- if: '$CI_COMMIT_MESSAGE =~ /test/'
- if: '$CI_COMMIT_BRANCH =~ /test/ || $CI_COMMIT_BRANCH == "production" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
script:
- docker run -v ${CI_PROJECT_DIR}:/sites/memorekall/www/web_dev -v /log:/sites/memorekall/www/log $TEST_IMAGE ./tools/ci-job.sh
# We need to copy files to a shared path that is accessible on the main host to allow the volume to work
- 'export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"'
- mkdir -p ${SHARED_PATH}
- cp -r ${CI_PROJECT_DIR}/* ${SHARED_PATH}
- ls ${SHARED_PATH}
- docker run -v ${SHARED_PATH}:/sites/memorekall/www/web_dev -v /log:/sites/memorekall/www/web_dev/log --entrypoint /sites/memorekall/www/web_dev/tools/ci-job.sh $TEST_IMAGE
artifacts:
when: always
expire_in: 1 week
......
......@@ -18,6 +18,7 @@ run_step(){
fi
}
run_step "Starting apache" apache2ctl -DFOREGROUND &
run_step "PHP dependencies" composer install
run_step "Javascript dependencies" npm install
run_step "Assets compilation" npm run dev
......@@ -25,3 +26,4 @@ run_step "Unit and functional tests" composer tests
run_step "Php Code Sniffer" composer phpcs
run_step "Php Static analysis" composer phpstan
run_step "Javascript ESLint" npm run lint
exit_on_fail $? "starting apache"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment