Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-1473

Add build properties into scheduler /var endpoint

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • Build
    • None

    Description

      The https://reviews.apache.org/r/37987/ removed (legitimately) an unused piece of functionality that could be very useful to us. The BuildInfo used to aggregate build properties (see below) and exposed them via our stats /var endpoint. Suggest restoring BuildInfo and adding a gradle hook to populate build details.

      Example bash script collecting git/build props:

      set -eu
      
      properties_file=$1
      
      mkdir -p $(dirname $properties_file)
      
      cat > $properties_file <<EOF
      build.time=$(date -u +'%Y-%m-%d %H:%M:%S %Z')
      build.date=$(date +'%a %Y-%m-%d')
      build.git.revision=$(git rev-parse HEAD)
      build.git.tag=$(git describe --dirty)
      build.machine=$(hostname -f)
      build.path=$PWD
      build.user.name=$USER
      EOF
      

      Example gradle integration:

      task generateBuildProperties (type:Exec) {
        def outputDir = file("${buildDir}/build-properties")
        def outputFile = file("${outputDir}/build.properties")
        inputs.dir rootDir
        outputs.dir outputDir
        doFirst {
          outputDir.exists() || outputDir.mkdirs()
        }
      
        commandLine "${projectDir}/build-support/generate-build-properties", "${outputFile}"
      }
      
      sourceSets {
        main {
          output.dir generateBuildProperties
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

              yasumoto Joe Smith
              maximk Maxim Khutornenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment