Continuous Integration enables your team to deliver more software, with higher quality, over a longer period of time. A successful CI implementation requires proper management of sprint, product, and financial risk.
Install it, create the jobs, and adapt them to your team's workflow
Instance | m4.2xlarge |
Cores | 8 |
Memory | 32GB |
Cost | $0.40/hr |
Monthly | $~288 |
Memory / Job |
>=512MB (composer update) |
Concurrency |
Memory says ~48 jobs, but CPU limits hit first. ~10 in real world use due to other jobs. |
Juampy spent:
Your team presumably knows Drupal, JavaScript, programming. You might know Jenkins, but is it your job? What about after the initial setup?
The costs of hosting Jenkins efficiently are directly related to the expertise of your devops staff; you may pay more for a Jenkins expert than the hosting costs of an unoptimized architecture.
unit_kernel_tests: &unit_kernel_tests
<<: *defaults
steps:
- checkout
- *copy_robo
- restore_cache: *restore_cache
- run:
name: Run PHPUnit tests
command: robo job:run-unit-tests
- store_test_results:
path: /var/www/html/artifacts/phpunit
- store_artifacts:
path: /var/www/html/artifacts
- save_cache: *save_cache
Via workflows: split a job in several sub-jobs that run in parallel
defaults: &defaults
docker:
- image: juampynr/drupal8ci:latest
- image: selenium/standalone-chrome-debug:3.7.1-beryllium
- image: mariadb:10.3
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
cache:
directories:
- $HOME/.composer/cache/files
services:
- docker
env:
matrix:
- JOB=job:check-coding-standards
- JOB=job:run-unit-tests
- JOB=job:run-behat-tests
script:
- vendor/bin/robo $JOB
On top of the official documentation, there are a lot of private and open source projects that use Travis CI so it's relatively easy to find tutorials and examples.
"Tests are too hard"— Many developers, including those on stage
"We don't trust the tests"— A reasonably skeptical QA lead
"We will spend more time on tests than fixing bugs"— A project manager with experience
"We need to deliver"— Every product owner, ever
Are you continuously stretching your code base to be larger, or refining and replacing the same code, over and over?
Can you easily deploy updates, or is software being distributed to far-flung teams?
Where is your code running? One site and environment, or many?
Regression testing is the biggest pain point. Developers as QA can be a great model.
"Tests are too hard"
Tests are tools and APIs that teach you the underlying systems.
"We don't trust the tests"
If you have a dedicated QA team, they need to be completely integrated with development.
"We will spend more time on tests than fixing bugs"
Be tactical about what to test. Trust your developers. Track your hours.
"We need to deliver"
Continuous integration leads to continuous delivery.