Last active
February 21, 2020 08:06
-
-
Save eugcar/745da0b138d4abc3132ddd7c8cfba5de to your computer and use it in GitHub Desktop.
Bitbucket pipelines configuration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| image: atlassian/default-image:2 | |
| pipelines: | |
| branches: | |
| master: | |
| - step: | |
| name: Build and test with docker-compose | |
| services: | |
| - docker | |
| caches: | |
| - docker | |
| script: | |
| # Initialize | |
| - cp .env.dist .env | |
| - source .env | |
| - mv -f docker-compose-pipelines.yml docker-compose.yml | |
| # Build images and start containers | |
| - docker-compose up --detach --quiet-pull | |
| # Check if the cluster is initialized. If within 5 minutes it is not ready go on anyway. | |
| - docker-compose exec -T php-fpm bash -c 'for i in {1..300}; do if [[ -f '/.initialized' ]]; then break; fi; sleep 1; done;' | |
| # Setup the project | |
| - docker-compose exec -u ${HOST_USER} -T php-fpm bash -c 'composer install --no-interaction' | |
| # Execute tests | |
| - docker-compose exec -u ${HOST_USER} -T php-fpm bash -c './bin/phpunit --log-junit ./test-reports/phpunit.xml' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment