Percona-Lab / mongodb_consistent_backup

A tool for performing consistent backups of MongoDB Clusters or Replica Sets
https://www.percona.com
Apache License 2.0
276 stars 81 forks source link

Support Travis-ci Continuous Integration testing #197

Closed timvaillancourt closed 7 years ago

timvaillancourt commented 7 years ago

This PR sets up auto Travis-ci builds of our project (after some setup in travis-ci.org), currently testing on timvaillancourt fork only.

The end result of the new .travis.yml and few docker-compose+bash scripts is Travis-ci will now build our project and full-integration test it against various versions of MongoDB in both cluster and replset mode on each commit (!). This could also run unit tests if we had any 😄 (maybe later).

Full changes:

  1. Added .travis.yml to setup Travis-Ci.
  2. Add 'make flake8' step to run flake8 code-quality checks (will be added to be build after I do a sweep of existing failures).
  3. Make Dockerfile build only the new binary if the other intermediate containers aren't changed.
  4. Add Travis-ci build status and latest-release badge to README.
  5. Added 'google_compute_engine' to requirements.txt, this causes failures on any Google Cloud Engine host (and Travis-ci runs on GCE only).
  6. Docker-compose and bash wrapper-scripts (run-cluster.sh and run-replset.sh) in scripts/travis-ci to allow Travis-CI to spawn replsets or clusters to integration-test our code on.

Current tests:

  1. PSMDB 3.4 Cluster w/CSRS configsvrs
  2. PSMDB 3.4 Replset
  3. PSMDB 3.2 Cluster w/CSRS configsvrs
  4. PSMDB 3.2 Replset
  5. PSMDB 3.2 Replset + No Archiving
  6. PSMDB 3.2 Replset + ZBackup Archiving
  7. PSMDB 3.0 Replset

Coming Soon:

  1. flake8 build step (after cleanup)
  2. PSMDB 3.0 Cluster w/SCCC configsvrs (test broken right now)