mongodb/mongo-ruby-driver

View on GitHub
.evergreen/config/standard.yml.erb

Summary

Maintainability
Test Coverage
<% tt = %w(standalone replica-set sharded-cluster) %>

buildvariants:
  - matrix_name: "docker"
    matrix_spec:
      ruby: ["ruby-2.7"]
      mongodb-version: "4.2"
      topology: standalone
      os: ubuntu1804
      preload: preload
    display_name: "Docker ${os} ${mongodb-version} ${topology} ${ruby} ${preload}"
    tasks:
      - name: "test-docker"

  - matrix_name: "docker"
    matrix_spec:
      ruby: ["ruby-2.7"]
      mongodb-version: "4.2"
      topology: standalone
      os: ubuntu1804
      preload: nopreload
    display_name: "Docker ${os} ${mongodb-version} ${topology} ${ruby} ${preload}"
    tasks:
      - name: "test-docker"

  - matrix_name: "mongo-4.2"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: ["ruby-2.7", "ruby-2.5"]
      mongodb-version: ['4.2']
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "mongo-4.0"
    matrix_spec:
      auth-and-ssl: ["noauth-and-ssl", "auth-and-nossl"]
      ruby: "ruby-2.6"
      mongodb-version: ['4.0']
      topology: <%= tt %>
      os: rhel70
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "mongo-3.6"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: "ruby-2.5"
      mongodb-version: ['3.6']
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "mongo-4.4"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: ["ruby-3.0", "ruby-2.7"]
      mongodb-version: '4.4'
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "mongo-5.0"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: ["ruby-3.1", "ruby-2.7"]
      mongodb-version: '5.0'
      topology: '*'
      os: ubuntu1804
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "single-lb"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: ["ruby-3.0"]
      mongodb-version: '5.0'
      topology: load-balanced
      single-mongos: single-mongos
      os: ubuntu2004
    display_name: "${mongodb-version} ${topology} single-lb ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "mongo-5.0-api-version"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: ["ruby-3.1"]
      mongodb-version: '5.0'
      topology: standalone
      api-version-required: yes
      os: ubuntu1804
    display_name: "${mongodb-version} api-version-required ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "single-mongos"
    matrix_spec:
      auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
      ruby: "ruby-2.6"
      mongodb-version: ['4.0', '4.2', '4.4']
      topology: "sharded-cluster"
      single-mongos: single-mongos
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} single-mongos ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "no-retry-reads"
    matrix_spec:
      retry-reads: no-retry-reads
      ruby: "ruby-2.6"
      mongodb-version: ["4.0"]
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} ${retry-reads} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "no-retry-writes"
    matrix_spec:
      retry-writes: no-retry-writes
      ruby: ["ruby-2.7"]
      mongodb-version: ["4.0"]
      topology: [replica-set, sharded-cluster]
      os: rhel70
    display_name: "${mongodb-version} ${topology} ${retry-writes} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: mmapv1
    matrix_spec:
      ruby: "ruby-2.5"
      mongodb-version: ['3.6', '4.0']
      topology: <%= tt %>
      storage-engine: mmapv1
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} mmapv1 ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "lint-5.0"
    matrix_spec:
      lint: on
      ruby: ["ruby-3.1", "ruby-2.7"]
      mongodb-version: ["5.0"]
      topology: '*'
      os: ubuntu2004
    display_name: "${mongodb-version} ${topology} ${lint} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "fork"
    matrix_spec:
      fork: on
      ruby: ["ruby-3.0", "ruby-2.7"]
      mongodb-version: ["4.4"]
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} fork ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "solo"
    matrix_spec:
      solo: on
      ruby: [ruby-3.1, ruby-3.0, ruby-2.7, ruby-2.6, ruby-2.5, jruby-9.2]
      mongodb-version: ["4.4"]
      topology: <%= tt %>
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} solo ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "stress"
    matrix_spec:
      stress: on
      ruby: ["ruby-2.7"]
      mongodb-version: ["4.4", '4.2', '4.0', '3.6']
      topology: replica-set
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} stress ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "x509-tests"
    matrix_spec:
      auth-and-ssl: "x509"
      ruby: "ruby-2.7"
      mongodb-version: "4.2"
      topology: standalone
      os: ubuntu1604
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "jruby-auth"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: "jruby-9.2"
      mongodb-version: "4.2"
      topology: <%= tt %>
      os: rhel80
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "jruby-noauth"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: "jruby-9.2"
      mongodb-version: "3.6"
      topology: <%= tt %>
      os: rhel70
    display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "zlib-auth"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-2.7"]
      mongodb-version: "4.4"
      topology: "replica-set"
      compressor: 'zlib'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "zlib-auth-3.0"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-3.0"]
      mongodb-version: "4.4"
      topology: "standalone"
      compressor: 'zlib'
      os: ubuntu2004
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "zlib-noauth"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: "ruby-2.5"
      mongodb-version: "3.6"
      topology: replica-set
      compressor: 'zlib'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "snappy-auth"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-2.7"]
      mongodb-version: "4.4"
      topology: "replica-set"
      compressor: 'snappy'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "snappy-auth-3"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-3.1"]
      mongodb-version: "4.4"
      topology: "standalone"
      compressor: 'snappy'
      os: ubuntu2004
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "snappy-noauth"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: "ruby-2.5"
      mongodb-version: ["3.6"]
      topology: replica-set
      compressor: 'snappy'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

#  https://jira.mongodb.org/browse/RUBY-2723
#  Enable or remove when the ticket is resolved.
#  - matrix_name: "snappy-jruby"
#    matrix_spec:
#      ruby: jruby-9.2
#      mongodb-version: "4.4"
#      topology: replica-set
#      compressor: 'snappy'
#      os: ubuntu1604
#    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
#    tasks:
#      - name: "test-mlaunch"

  - matrix_name: "zstd-auth"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-2.7"]
      mongodb-version: "4.4"
      topology: "replica-set"
      compressor: 'zstd'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "zstd-auth-3.0"
    matrix_spec:
      auth-and-ssl: "auth-and-ssl"
      ruby: ["ruby-3.0"]
      mongodb-version: "4.4"
      topology: "standalone"
      compressor: 'zstd'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "zstd-noauth"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: "ruby-2.5"
      mongodb-version: "4.2"
      topology: replica-set
      compressor: 'zstd'
      os: ubuntu1604
    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
    tasks:
      - name: "test-mlaunch"

#  - matrix_name: "zstd-jruby"
#    matrix_spec:
#      ruby: jruby-9.2
#      mongodb-version: "4.4"
#      topology: replica-set
#      compressor: 'zstd'
#      os: ubuntu1604
#    display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
#    tasks:
#      - name: "test-mlaunch"

#   - matrix_name: "ruby-head"
#     matrix_spec:
#       auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
#       ruby: ["ruby-head"]
#       mongodb-version: "4.2"
#       topology: "*"
#       os: ubuntu1604
#     display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
#     tasks:
#       - name: "test-mlaunch"

  - matrix_name: "activesupport"
    matrix_spec:
      ruby: ["ruby-3.0", "ruby-2.7"]
      mongodb-version: '4.4'
      topology: replica-set
      as: as
      os: ubuntu1604
    display_name: "AS ${mongodb-version} ${topology} ${ruby}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "bson"
    matrix_spec:
      ruby: [ruby-3.1, ruby-2.7, jruby-9.2]
      mongodb-version: '4.4'
      topology: replica-set
      bson: "*"
      os: rhel80
    display_name: "AS ${mongodb-version} ${topology} ${ruby} ${bson}"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "3.6-with-3.4-fcv"
    matrix_spec:
      fcv: '3.4'
      ruby: ["ruby-2.5"]
      mongodb-version: '3.6'
      topology: replica-set
      os: ubuntu1604
    display_name: "3.6 Replica Set with 3.4 FCV"
    tasks:
      - name: "test-mlaunch"

  - matrix_name: "kerberos-integration-ubuntu"
    matrix_spec:
      # Other Rubies segfault
      ruby: ruby-2.5
    display_name: "Kerberos integration Ubuntu ${ruby}"
    run_on:
      - ubuntu1604-small
    tasks:
      - name: "test-kerberos-integration"

  # All skipped because of segfaults
  #- matrix_name: "kerberos-integration-rhel"
  #  matrix_spec:
  #    # Other Rubies segfault
  #    ruby: [ruby-2.7]
  #    os: rhel70
  #  display_name: "Kerberos integration RHEL ${ruby} ${os}"
  #  tasks:
  #    - name: "test-kerberos-integration"

  # Kerberos integration tests on debian are omitted due to segfaults:
  # https://jira.mongodb.org/browse/RUBY-1534

  - matrix_name: "kerberos-unit"
    matrix_spec:
      ruby: "ruby-2.6"
      mongodb-version: "4.2"
      topology: standalone
      os: rhel70
      auth-and-ssl: kerberos
    display_name: "Kerberos Tests"
    tasks:
      - name: "test-kerberos"

  - matrix_name: "fle-4.4"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      # https://jira.mongodb.org/browse/RUBY-2832
      # ruby: [ruby-3.0, ruby-2.7, jruby-9.2]
      ruby: [ruby-3.1, ruby-3.0, ruby-2.7]
      topology: standalone
      mongodb-version: ['4.4']
      os: ubuntu1804
      fle: fle
    display_name: "FLE: ${mongodb-version} ${ruby}"
    tasks:
      - name: "test-fle"

  - matrix_name: "fle-4.2"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: [ruby-2.5]
      topology: [standalone, replica-set, sharded-cluster]
      mongodb-version: ["4.2"]
      os: ubuntu1804
      fle: fle
    display_name: "FLE: ${topology} ${mongodb-version} ${ruby}"
    tasks:
      - name: "test-fle"

  - matrix_name: "fle-4.0"
    matrix_spec:
      auth-and-ssl: "noauth-and-nossl"
      ruby: [ruby-2.6]
      topology: standalone
      mongodb-version: ["4.0"]
      os: ubuntu1804
      fle: fle
    display_name: "FLE: ${mongodb-version} ${ruby}"
    tasks:
      - name: "test-fle"

  - matrix_name: aws-auth-regular
    matrix_spec:
      auth-and-ssl: aws-regular
      ruby: [ruby-2.7]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1804
    display_name: "AWS auth regular: ${mongodb-version} ${ruby}"
    tasks:
      - name: "test-aws-auth"

  - matrix_name: aws-auth-temporary
    matrix_spec:
      auth-and-ssl: [aws-assume-role, aws-ec2, aws-ecs]
      ruby: [ruby-3.1]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1804
    display_name: "AWS auth temporary: ${auth-and-ssl} ${mongodb-version} ${ruby}"
    tasks:
      - name: "test-aws-auth"

  # No JRuby due to https://github.com/jruby/jruby-openssl/issues/210
  # TODO Add ruby-3.0: RUBY-2717
  <%|= standard_debian_rubies(%w(ruby-2.5 ruby-2.6 ruby-2.7), key: 'docker-distro') do %>
    matrix_name: ocsp-verifier
    matrix_spec:
      ocsp-verifier: true
      # No JRuby due to https://github.com/jruby/jruby-openssl/issues/210
      ruby: [ruby-3.0, ruby-2.7, ruby-2.6, ruby-2.5]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1604
    display_name: "OCSP verifier: ${mongodb-version} ${ruby}"
    tasks:
      - name: test-via-docker
  <%| end %>

  - matrix_name: ocsp-must-staple
    matrix_spec:
      ocsp-algorithm: ecdsa
      ocsp-must-staple: on
      ocsp-delegate: on
      ruby: [ruby-3.0, ruby-2.7]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1604
      auth-and-ssl: noauth-and-ssl
    display_name: "OCSP integration - must staple: ${mongodb-version} ${ruby}"
    tasks:
      - name: test-mlaunch

  - matrix_name: ocsp-unknown
    matrix_spec:
      ocsp-algorithm: rsa
      ocsp-status: unknown
      ruby: [ruby-3.0, ruby-2.7]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1604
      auth-and-ssl: noauth-and-ssl
    display_name: "OCSP integration - unknown: ${mongodb-version} ${ruby}"
    tasks:
      - name: test-mlaunch

  <% [
    %w(valid none pass),
    %w(unknown none pass),
    %w(revoked none fail),

    %w(valid tlsInsecure=true pass),
    %w(unknown tlsInsecure=true pass),
    %w(revoked tlsInsecure=true pass),

    %w(valid tlsAllowInvalidCertificates=true pass),
    %w(unknown tlsAllowInvalidCertificates=true pass),
    %w(revoked tlsAllowInvalidCertificates=true pass),
  ].each do |status, extra_uri_options, outcome|
  %>
  - matrix_name: ocsp-connectivity
    matrix_spec:
      ocsp-algorithm: '*'
      ocsp-status: <%= status %>
      ocsp-delegate: '*'
      ocsp-connectivity: <%= outcome %>
      extra-uri-options: "<%= extra_uri_options %>"
      ruby: [ruby-3.0, ruby-2.7]
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1604
    display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${extra-uri-options} ${mongodb-version} ${ruby}"
    tasks:
      - name: test-mlaunch
  <% end %>

  - matrix_name: ocsp-connectivity-jruby
    matrix_spec:
      # ECDSA does not work on JRuby.
      # https://github.com/jruby/jruby-openssl/issues/213
      ocsp-algorithm: rsa
      # We do not perform OCSP verification on JRuby, therefore the revoked
      # configuration fails (connection succeeds due to lack of verification
      # when it is expected to fail).
      # https://github.com/jruby/jruby-openssl/issues/210
      ocsp-status: [valid, unknown]
      ocsp-delegate: '*'
      ocsp-connectivity: pass
      ruby: jruby-9.2
      topology: standalone
      mongodb-version: '4.4'
      os: ubuntu1804
    display_name: "OCSP connectivity: ${ocsp-algorithm} ${ocsp-status} ${ocsp-delegate} ${mongodb-version} ${ruby}"
    tasks:
      - name: test-mlaunch