Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29422

Respect version.json in Evergreen patch builds

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • v3.4, v3.2
    • Evergreen 2017-08-15

      To create a patch build that can be deployed with Ops Manager, it is currently necessary to update both etc/evergreen.yml to include a custom version string and create a version.json file to set the githash, which repeats (hopefully) the version string. See this patch build for an example.

      I propose that we make the change ramon.fernandez suggested in SERVER-21977, and if a version.json file is included in a patch, have it be the source of truth.

      Something like:

      --- a/etc/evergreen.yml
      +++ b/etc/evergreen.yml
      @@ -76,6 +76,12 @@ variables:
             set -o errexit
             set -o verbose
      
      +      # If the build supplies a version.json file, use it.
      +      if [ -f version.json ]; then
      +        SCONS_CACHE_MODE=${scons_cache_mode|nolinked} USE_SCONS_CACHE=${use_scons_cache|false} ${python|/opt/mongodbtoolchain/v2/bin/python2} buildscripts/generate_compile_expansions.py version.json | tee compile_expansions.yml
      +        exit
      +      fi
      +
             # We get the raw version string (r1.2.3-45-gabcdef) from git
             MONGO_VERSION=$(git describe)
             # If this is a patch build, we add the patch version id to the version string so we know
      

            Assignee:
            brian.samek@mongodb.com Brian Samek
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: