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

Respect version.json in Evergreen patch builds

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.12
    • Component/s: Build
    • Labels:
      None

      Description

      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
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: