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
- duplicates
-
AURORA-902 Scheduler should embed build info in /vars
- Resolved