I have a favor to ask and tell me guys what am I doing wrong with GitLab CI. Firstly the environment.
My question is basically: what should I do?
I though of 2 sollutions
- Create a sudo crontab to remove the containers every week
- Can’t I tell GitLab to build the container and after the build have succeeded delete it?
Here is my gitlab-ci.yml file for you, so you can see if I’ve made an error:
- composer self-update
- composer install --no-scripts
- php artisan clear-compiled
- php artisan optimize
- cp .env.gitlab .env
- php artisan key:generate
- composer dump-auto
- php artisan migrate:refresh --seed
- echo “Running PHPUnit Tests”
- php vendor/bin/phpunit --colors --debug
- curl http://here/is/my/staging/website.php
- curl http://here/is/my/production/website.php
In the staging and production stages I just wish to use the last command so, to curl a specific php file on the servers. However this simple job takes about 1 minute to complete. Why? How can I reduce the time for it?
Thank you in advance!