Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Pipelines!

79 views

Published on

Presentazione per l'incontro PUG Roma di settembre 2019

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Pipelines!

  1. 1. Pipelines! PUG Roma 24 settembre 2019 Massimiliano Arione
  2. 2. Pipelines
  3. 3. CI/CD
  4. 4. CI/CD/CD
  5. 5. Trigger
  6. 6. azioni
  7. 7. azioni: CI
  8. 8. azioni: CD
  9. 9. azioni condizionali
  10. 10. hands on!
  11. 11. SCM
  12. 12. la sacra trimurti
  13. 13. saas
  14. 14. image: garak/docker-php7:7.2 definitions: services: mysql: image: mysql:5.7 environment: MYSQL_DATABASE: symfony MYSQL_USER: root MYSQL_ROOT_PASSWORD: root pipelines: default: - step: name: test caches: - composer services: - mysql script: - mkdir -p public/build && echo '{}' > public/build/manifest.json - composer install -n --no-progress --no-suggest - bin/console doctrine:schema:update --force -n - bin/console doctrine:fixtures:load -n - bin/phpunit --log-junit ./test-reports/junit.xml - step: name: deploy to stage trigger: manual script: - cap staging deploy bitbucket-pipelines.yml
  15. 15. stages: - test variables: MYSQL_DATABASE: symfony_test MYSQL_ROOT_PASSWORD: root test: stage: test image: php:5.6-cli services: - mysql:5.7 before_script: - cp app/config/parameters.yml.dist app/config/parameters.yml - apt-get update && apt-get install -y --no-install-recommends git zip unzip libmcrypt-dev - docker-php-ext-install mbstring mcrypt pdo_mysql json intl gd xml zip bcmath - composer install -n --no-progress --no-suggest - ./bin/console doctrine:schema:update --force -e test -n - ./bin/console doctrine:fixtures:load -e test -n script: - ./bin/phpunit -d memory_limit=-1 cache: key: ${CI_BUILD_REF_NAME} paths: - vendor/ .gitlab-ci.yml
  16. 16. version: 2 jobs: [...] workflows: [...] .circleci/config.yml
  17. 17. jobs: test: [...] test_coverage: [...] deploy_stage: [...] deploy_prod: [...] .circleci/config.yml
  18. 18. workflows: version: 2 build_test_deploy: jobs: - test - deploy_stage: requires: - test - approva_deploy: type: approval requires: - test - deploy_prod: requires: - approva_deploy - approva_coverage: type: approval requires: - test - test_coverage: requires: - approva_coverage .circleci/config.yml
  19. 19. jobs: test: docker: - image: circleci/php:7.2-cli - image: circleci/mysql:5.7 working_directory: ~/app steps: - checkout - run: name: install system packages command: sudo apt-get update && sudo apt-get install -qqy libzip-dev libicu-dev - run: name: install php packages command: sudo docker-php-ext-install zip pdo pdo_mysql intl - restore_cache: keys: - v1-dependencies-{{ checksum "composer.json" }} - v1-dependencies- - run: name: install project dependencies command: composer install -n --no-progress --no-suggest [...] .circleci/config.yml
  20. 20. [...] - save_cache: paths: - ./vendor key: v1-dependencies-{{ checksum "composer.json" }} - run: name: prepare test database command: bin/console doctrine:schema:update -n --force && bin/console do:fi:lo -n - run: name: run tests command: bin/phpunit -d memory_limit=-1 --log-junit logs/junit.xml .circleci/config.yml

×